Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68219bdf authored by Geliang Tang's avatar Geliang Tang Committed by Jens Axboe
Browse files

block: floppy: use setup_timer



Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: default avatarGeliang Tang <geliangtang@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 7a88fa19
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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");