diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-21 12:09:17 -0700 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-11-02 15:50:50 -0700 |
commit | 41760d0e0f1a013e607956eaf22a60ff6dd03784 (patch) | |
tree | 70d59606d9493cbe6e294cf1539f3ed4622f0e9d /drivers/pcmcia/pd6729.c | |
parent | 6243d38fc0775e9dc1a38835aef55efb273ac4d5 (diff) | |
download | linux-41760d0e0f1a013e607956eaf22a60ff6dd03784.tar.gz linux-41760d0e0f1a013e607956eaf22a60ff6dd03784.tar.bz2 linux-41760d0e0f1a013e607956eaf22a60ff6dd03784.zip |
drivers/pcmcia: 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: Florian Fainelli <f.fainelli@gmail.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: David Howells <dhowells@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-pcmcia@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk> # for soc_common.c
Diffstat (limited to 'drivers/pcmcia/pd6729.c')
-rw-r--r-- | drivers/pcmcia/pd6729.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c index 0f70b4d58f9e..959ae3e65ef8 100644 --- a/drivers/pcmcia/pd6729.c +++ b/drivers/pcmcia/pd6729.c @@ -234,9 +234,9 @@ static irqreturn_t pd6729_interrupt(int irq, void *dev) /* socket functions */ -static void pd6729_interrupt_wrapper(unsigned long data) +static void pd6729_interrupt_wrapper(struct timer_list *t) { - struct pd6729_socket *socket = (struct pd6729_socket *) data; + struct pd6729_socket *socket = from_timer(socket, t, poll_timer); pd6729_interrupt(0, (void *)socket); mod_timer(&socket->poll_timer, jiffies + HZ); @@ -707,8 +707,7 @@ static int pd6729_pci_probe(struct pci_dev *dev, } } else { /* poll Card status change */ - setup_timer(&socket->poll_timer, pd6729_interrupt_wrapper, - (unsigned long)socket); + timer_setup(&socket->poll_timer, pd6729_interrupt_wrapper, 0); mod_timer(&socket->poll_timer, jiffies + HZ); } |