[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1396360159-16244-2-git-send-email-Julia.Lawall@lip6.fr>
Date: Tue, 1 Apr 2014 15:49:17 +0200
From: Julia Lawall <Julia.Lawall@...6.fr>
To: Alex Dubov <oakad@...oo.com>
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] memstick: replace del_timer by del_timer_sync
From: Julia Lawall <Julia.Lawall@...6.fr>
Use del_timer_sync to ensure that the timer is stopped on all CPUs before
the driver exits.
This change was suggested by Thomas Gleixner.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r@
identifier i,t,ex;
@@
struct t i = { .remove = ex, };
@@
identifier r.ex;
@@
ex(...) {
<...
- del_timer
+ del_timer_sync
(...)
...>
}
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@...6.fr>
---
Not tested.
drivers/memstick/host/tifm_ms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/memstick/host/tifm_ms.c b/drivers/memstick/host/tifm_ms.c
index 7bafa72..bc643d7 100644
--- a/drivers/memstick/host/tifm_ms.c
+++ b/drivers/memstick/host/tifm_ms.c
@@ -605,7 +605,7 @@ static void tifm_ms_remove(struct tifm_dev *sock)
spin_lock_irqsave(&sock->lock, flags);
host->eject = 1;
if (host->req) {
- del_timer(&host->timer);
+ del_timer_sync(&host->timer);
writel(TIFM_FIFO_INT_SETALL,
sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR);
writel(TIFM_DMA_RESET, sock->addr + SOCK_DMA_CONTROL);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists