projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68219bd
)
mg_disk: use setup_timer
author
Geliang Tang
<
[email protected]
>
Fri, 24 Mar 2017 14:15:13 +0000
(22:15 +0800)
committer
Jens Axboe
<
[email protected]
>
Fri, 24 Mar 2017 14:22:09 +0000
(08:22 -0600)
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]
>
drivers/block/mg_disk.c
patch
|
blob
|
history
diff --git
a/drivers/block/mg_disk.c
b/drivers/block/mg_disk.c
index 286f276f586e4674e323dafd3a1a60ababcc9088..e88e7b06c6161a2359cef5ec53b8771ff733bce2 100644
(file)
--- 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) {