block: floppy: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
7a88fa1919
commit
68219bdf5f
|
@ -4207,9 +4207,7 @@ static int __init do_floppy_init(void)
|
||||||
disks[drive]->fops = &floppy_fops;
|
disks[drive]->fops = &floppy_fops;
|
||||||
sprintf(disks[drive]->disk_name, "fd%d", drive);
|
sprintf(disks[drive]->disk_name, "fd%d", drive);
|
||||||
|
|
||||||
init_timer(&motor_off_timer[drive]);
|
setup_timer(&motor_off_timer[drive], motor_off_callback, drive);
|
||||||
motor_off_timer[drive].data = drive;
|
|
||||||
motor_off_timer[drive].function = motor_off_callback;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
err = register_blkdev(FLOPPY_MAJOR, "fd");
|
err = register_blkdev(FLOPPY_MAJOR, "fd");
|
||||||
|
|
Loading…
Reference in New Issue