提交 0a3ef9db 编写于 作者: G Geliang Tang 提交者: Jens Axboe

mg_disk: use setup_timer

Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: NGeliang Tang <geliangtang@gmail.com>
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 68219bdf
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册