summaryrefslogtreecommitdiff
path: root/drivers/pcmcia/soc_common.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-21 22:09:17 +0300
committerKees Cook <keescook@chromium.org>2017-11-03 01:50:50 +0300
commit41760d0e0f1a013e607956eaf22a60ff6dd03784 (patch)
tree70d59606d9493cbe6e294cf1539f3ed4622f0e9d /drivers/pcmcia/soc_common.c
parent6243d38fc0775e9dc1a38835aef55efb273ac4d5 (diff)
downloadlinux-41760d0e0f1a013e607956eaf22a60ff6dd03784.tar.xz
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/soc_common.c')
-rw-r--r--drivers/pcmcia/soc_common.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index b6b316de055c..764650eb8897 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -456,9 +456,9 @@ static void soc_common_check_status(struct soc_pcmcia_socket *skt)
}
/* Let's poll for events in addition to IRQs since IRQ only is unreliable... */
-static void soc_common_pcmcia_poll_event(unsigned long dummy)
+static void soc_common_pcmcia_poll_event(struct timer_list *t)
{
- struct soc_pcmcia_socket *skt = (struct soc_pcmcia_socket *)dummy;
+ struct soc_pcmcia_socket *skt = from_timer(skt, t, poll_timer);
debug(skt, 4, "polling for events\n");
mod_timer(&skt->poll_timer, jiffies + SOC_PCMCIA_POLL_PERIOD);
@@ -794,8 +794,7 @@ int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt)
skt->cs_state = dead_socket;
- setup_timer(&skt->poll_timer, soc_common_pcmcia_poll_event,
- (unsigned long)skt);
+ timer_setup(&skt->poll_timer, soc_common_pcmcia_poll_event, 0);
skt->poll_timer.expires = jiffies + SOC_PCMCIA_POLL_PERIOD;
ret = request_resource(&iomem_resource, &skt->res_skt);