summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/bfin_cf_pcmcia.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-21 21:09:17 +0200
committerKees Cook <keescook@chromium.org>2017-11-02 23:50:50 +0100
commit41760d0e0f1a013e607956eaf22a60ff6dd03784 (patch)
tree70d59606d9493cbe6e294cf1539f3ed4622f0e9d /drivers/pcmcia/bfin_cf_pcmcia.c
parentdrivers/memstick: Convert timers to use timer_setup() (diff)
downloadlinux-41760d0e0f1a013e607956eaf22a60ff6dd03784.tar.xz
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/bfin_cf_pcmcia.c')
-rw-r--r--drivers/pcmcia/bfin_cf_pcmcia.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pcmcia/bfin_cf_pcmcia.c b/drivers/pcmcia/bfin_cf_pcmcia.c
index 8b0923fd76c6..00a296d431ba 100644
--- a/drivers/pcmcia/bfin_cf_pcmcia.c
+++ b/drivers/pcmcia/bfin_cf_pcmcia.c
@@ -86,9 +86,9 @@ static int bfin_cf_ss_init(struct pcmcia_socket *s)
}
/* the timer is primarily to kick this socket's pccardd */
-static void bfin_cf_timer(unsigned long _cf)
+static void bfin_cf_timer(struct timer_list *t)
{
- struct bfin_cf_socket *cf = (void *)_cf;
+ struct bfin_cf_socket *cf = from_timer(cf, t, timer);
unsigned short present = bfin_cf_present(cf->cd_pfx);
if (present != cf->present) {
@@ -227,7 +227,7 @@ static int bfin_cf_probe(struct platform_device *pdev)
cf->cd_pfx = cd_pfx;
- setup_timer(&cf->timer, bfin_cf_timer, (unsigned long)cf);
+ timer_setup(&cf->timer, bfin_cf_timer, 0);
cf->pdev = pdev;
platform_set_drvdata(pdev, cf);