summaryrefslogtreecommitdiffstats
path: root/drivers/memstick/host/tifm_ms.c
diff options
context:
space:
mode:
authorKees Cook2017-10-22 23:43:33 +0200
committerKees Cook2017-11-02 23:50:50 +0100
commit6243d38fc0775e9dc1a38835aef55efb273ac4d5 (patch)
treeae5611bfdced41d58938485505753f21abdeeaea /drivers/memstick/host/tifm_ms.c
parentdrivers/macintosh: Convert timers to use timer_setup() (diff)
downloadkernel-qcow2-linux-6243d38fc0775e9dc1a38835aef55efb273ac4d5.tar.gz
kernel-qcow2-linux-6243d38fc0775e9dc1a38835aef55efb273ac4d5.tar.xz
kernel-qcow2-linux-6243d38fc0775e9dc1a38835aef55efb273ac4d5.zip
drivers/memstick: 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: Maxim Levitsky <maximlevitsky@gmail.com> Cc: Alex Dubov <oakad@yahoo.com> Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/memstick/host/tifm_ms.c')
-rw-r--r--drivers/memstick/host/tifm_ms.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/memstick/host/tifm_ms.c b/drivers/memstick/host/tifm_ms.c
index 7bafa72f8f57..bed205849d02 100644
--- a/drivers/memstick/host/tifm_ms.c
+++ b/drivers/memstick/host/tifm_ms.c
@@ -538,9 +538,9 @@ static int tifm_ms_set_param(struct memstick_host *msh,
return 0;
}
-static void tifm_ms_abort(unsigned long data)
+static void tifm_ms_abort(struct timer_list *t)
{
- struct tifm_ms *host = (struct tifm_ms *)data;
+ struct tifm_ms *host = from_timer(host, t, timer);
dev_dbg(&host->dev->dev, "status %x\n",
readl(host->dev->addr + SOCK_MS_STATUS));
@@ -575,7 +575,7 @@ static int tifm_ms_probe(struct tifm_dev *sock)
host->dev = sock;
host->timeout_jiffies = msecs_to_jiffies(1000);
- setup_timer(&host->timer, tifm_ms_abort, (unsigned long)host);
+ timer_setup(&host->timer, tifm_ms_abort, 0);
tasklet_init(&host->notify, tifm_ms_req_tasklet, (unsigned long)msh);
msh->request = tifm_ms_submit_req;