diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-23 00:43:33 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-11-03 01:50:50 +0300 |
commit | 6243d38fc0775e9dc1a38835aef55efb273ac4d5 (patch) | |
tree | ae5611bfdced41d58938485505753f21abdeeaea /drivers/memstick/host/r592.c | |
parent | 0788f28575801dadbddbfbe11e0bcc8174fffee3 (diff) | |
download | linux-6243d38fc0775e9dc1a38835aef55efb273ac4d5.tar.xz |
drivers/memstick: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/memstick/host/r592.c')
-rw-r--r-- | drivers/memstick/host/r592.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c index d5cfb503b9d6..627d6e62fe31 100644 --- a/drivers/memstick/host/r592.c +++ b/drivers/memstick/host/r592.c @@ -616,9 +616,9 @@ static void r592_update_card_detect(struct r592_device *dev) } /* Timer routine that fires 1 second after last card detection event, */ -static void r592_detect_timer(long unsigned int data) +static void r592_detect_timer(struct timer_list *t) { - struct r592_device *dev = (struct r592_device *)data; + struct r592_device *dev = from_timer(dev, t, detect_timer); r592_update_card_detect(dev); memstick_detect_change(dev->host); } @@ -770,8 +770,7 @@ static int r592_probe(struct pci_dev *pdev, const struct pci_device_id *id) spin_lock_init(&dev->io_thread_lock); init_completion(&dev->dma_done); INIT_KFIFO(dev->pio_fifo); - setup_timer(&dev->detect_timer, - r592_detect_timer, (long unsigned int)dev); + timer_setup(&dev->detect_timer, r592_detect_timer, 0); /* Host initialization */ host->caps = MEMSTICK_CAP_PAR4; |