Skip to content

Commit

Permalink
block: floppy: use setup_timer
Browse files Browse the repository at this point in the history
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
geliangtang authored and axboe committed Mar 24, 2017
1 parent 7a88fa1 commit 68219bd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/block/floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 68219bd

Please sign in to comment.