diff options
author | Geliang Tang <geliangtang@gmail.com> | 2017-03-24 22:15:13 +0800 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-03-24 08:22:09 -0600 |
commit | 0a3ef9db64df90854d772e8343a14e044dc004bc (patch) | |
tree | 1ea72dd858e1928ea5dbfed2cd52cc1bd01dd5ca | |
parent | 68219bdf5f1d999e4bad09db0abbd9460bd93020 (diff) | |
download | linux-stable-0a3ef9db64df90854d772e8343a14e044dc004bc.tar.gz linux-stable-0a3ef9db64df90854d772e8343a14e044dc004bc.tar.bz2 linux-stable-0a3ef9db64df90854d772e8343a14e044dc004bc.zip |
mg_disk: 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/mg_disk.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c index 286f276f586e..e88e7b06c616 100644 --- a/drivers/block/mg_disk.c +++ b/drivers/block/mg_disk.c @@ -989,9 +989,7 @@ static int mg_probe(struct platform_device *plat_dev) blk_queue_max_hw_sectors(host->breq, MG_MAX_SECTS); blk_queue_logical_block_size(host->breq, MG_SECTOR_SIZE); - init_timer(&host->timer); - host->timer.function = mg_times_out; - host->timer.data = (unsigned long)host; + setup_timer(&host->timer, mg_times_out, (unsigned long)host); host->gd = alloc_disk(MG_DISK_MAX_PART); if (!host->gd) { |