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>
This commit is contained in:
@@ -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_max_hw_sectors(host->breq, MG_MAX_SECTS);
|
||||||
blk_queue_logical_block_size(host->breq, MG_SECTOR_SIZE);
|
blk_queue_logical_block_size(host->breq, MG_SECTOR_SIZE);
|
||||||
|
|
||||||
init_timer(&host->timer);
|
setup_timer(&host->timer, mg_times_out, (unsigned long)host);
|
||||||
host->timer.function = mg_times_out;
|
|
||||||
host->timer.data = (unsigned long)host;
|
|
||||||
|
|
||||||
host->gd = alloc_disk(MG_DISK_MAX_PART);
|
host->gd = alloc_disk(MG_DISK_MAX_PART);
|
||||||
if (!host->gd) {
|
if (!host->gd) {
|
||||||
|
Reference in New Issue
Block a user