path: root/drivers/pcmcia/omap_cf.c
diff options
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/omap_cf.c
parentdrivers/memstick: Convert timers to use timer_setup() (diff)
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/omap_cf.c')
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c
index 4e2f501e5548..8216ceb51b18 100644
--- a/drivers/pcmcia/omap_cf.c
+++ b/drivers/pcmcia/omap_cf.c
@@ -80,9 +80,9 @@ static int omap_cf_ss_init(struct pcmcia_socket *s)
/* the timer is primarily to kick this socket's pccardd */
-static void omap_cf_timer(unsigned long _cf)
+static void omap_cf_timer(struct timer_list *t)
- struct omap_cf_socket *cf = (void *) _cf;
+ struct omap_cf_socket *cf = from_timer(cf, t, timer);
unsigned present = omap_cf_present();
if (present != cf->present) {
@@ -102,7 +102,7 @@ static void omap_cf_timer(unsigned long _cf)
static irqreturn_t omap_cf_irq(int irq, void *_cf)
- omap_cf_timer((unsigned long)_cf);
+ omap_cf_timer(&_cf->timer);
@@ -220,7 +220,7 @@ static int __init omap_cf_probe(struct platform_device *pdev)
cf = kzalloc(sizeof *cf, GFP_KERNEL);
if (!cf)
return -ENOMEM;
- setup_timer(&cf->timer, omap_cf_timer, (unsigned long)cf);
+ timer_setup(&cf->timer, omap_cf_timer, 0);
cf->pdev = pdev;
platform_set_drvdata(pdev, cf);