diff options
Diffstat (limited to 'drivers/memstick/core/ms_block.c')
-rw-r--r-- | drivers/memstick/core/ms_block.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/memstick/core/ms_block.c b/drivers/memstick/core/ms_block.c index 22de7f5ed032..57b13dfbd21e 100644 --- a/drivers/memstick/core/ms_block.c +++ b/drivers/memstick/core/ms_block.c @@ -1492,9 +1492,9 @@ static int msb_ftl_scan(struct msb_data *msb) return 0; } -static void msb_cache_flush_timer(unsigned long data) +static void msb_cache_flush_timer(struct timer_list *t) { - struct msb_data *msb = (struct msb_data *)data; + struct msb_data *msb = from_timer(msb, t, cache_flush_timer); msb->need_flush_cache = true; queue_work(msb->io_queue, &msb->io_work); } @@ -1514,8 +1514,7 @@ static void msb_cache_discard(struct msb_data *msb) static int msb_cache_init(struct msb_data *msb) { - setup_timer(&msb->cache_flush_timer, msb_cache_flush_timer, - (unsigned long)msb); + timer_setup(&msb->cache_flush_timer, msb_cache_flush_timer, 0); if (!msb->cache) msb->cache = kzalloc(msb->block_size, GFP_KERNEL); |