summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2017-03-24 22:15:10 +0800
committerJens Axboe <axboe@fb.com>2017-03-24 08:22:07 -0600
commit68219bdf5f1d999e4bad09db0abbd9460bd93020 (patch)
treee975baceb5390d3bce92bbd626f405f5eb2dba29
parent7a88fa191944589b2ed795bbed32ca6e9e2df31f (diff)
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>
-rw-r--r--drivers/block/floppy.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 45b4384f650c..ce102ec47ef2 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4207,9 +4207,7 @@ static int __init do_floppy_init(void)
disks[drive]->fops = &floppy_fops;
sprintf(disks[drive]->disk_name, "fd%d", drive);
- init_timer(&motor_off_timer[drive]);
- motor_off_timer[drive].data = drive;
- motor_off_timer[drive].function = motor_off_callback;
+ setup_timer(&motor_off_timer[drive], motor_off_callback, drive);
}
err = register_blkdev(FLOPPY_MAJOR, "fd");