aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/bcm63xx_pcmcia.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-21 12:09:17 -0700
committerKees Cook <keescook@chromium.org>2017-11-02 15:50:50 -0700
commit41760d0e0f1a013e607956eaf22a60ff6dd03784 (patch)
tree70d59606d9493cbe6e294cf1539f3ed4622f0e9d /drivers/pcmcia/bcm63xx_pcmcia.c
parentdrivers/memstick: Convert timers to use timer_setup() (diff)
downloadlinux-dev-41760d0e0f1a013e607956eaf22a60ff6dd03784.tar.xz
linux-dev-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/bcm63xx_pcmcia.c')
-rw-r--r--drivers/pcmcia/bcm63xx_pcmcia.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pcmcia/bcm63xx_pcmcia.c b/drivers/pcmcia/bcm63xx_pcmcia.c
index 0802e0bc7d0c..16f573173471 100644
--- a/drivers/pcmcia/bcm63xx_pcmcia.c
+++ b/drivers/pcmcia/bcm63xx_pcmcia.c
@@ -263,12 +263,12 @@ static int bcm63xx_pcmcia_get_status(struct pcmcia_socket *sock,
/*
* socket polling timer callback
*/
-static void bcm63xx_pcmcia_poll(unsigned long data)
+static void bcm63xx_pcmcia_poll(struct timer_list *t)
{
struct bcm63xx_pcmcia_socket *skt;
unsigned int stat, events;
- skt = (struct bcm63xx_pcmcia_socket *)data;
+ skt = from_timer(skt, t, timer);
spin_lock_bh(&skt->lock);
@@ -392,7 +392,7 @@ static int bcm63xx_drv_pcmcia_probe(struct platform_device *pdev)
sock->map_size = resource_size(skt->common_res);
/* initialize polling timer */
- setup_timer(&skt->timer, bcm63xx_pcmcia_poll, (unsigned long)skt);
+ timer_setup(&skt->timer, bcm63xx_pcmcia_poll, 0);
/* initialize pcmcia control register, drive VS[12] to 0,
* leave CB IDSEL to the old value since it is set by the PCI