]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
block: floppy: use setup_timer
authorGeliang Tang <geliangtang@gmail.com>
Fri, 24 Mar 2017 14:15:10 +0000 (22:15 +0800)
committerJens Axboe <axboe@fb.com>
Fri, 24 Mar 2017 14:22:07 +0000 (08:22 -0600)
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>
drivers/block/floppy.c

index 45b4384f650ccedeed20c2b4718fa1be49b87b06..ce102ec47ef28a00ec9bcb00f9edaf1e39d0eacd 100644 (file)
@@ -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");