From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
Before a timer is freed, timer_shutdown_sync() must be called.
Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/
Cc: Minghao Chi <chi.minghao@zte.com.cn>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Souptick Joarder
Cc: Cai Huoqing <cai.huoqing@linux.dev>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
drivers/pcmcia/bcm63xx_pcmcia.c | 2 +-
drivers/pcmcia/electra_cf.c | 2 +-
drivers/pcmcia/omap_cf.c | 2 +-
drivers/pcmcia/pd6729.c | 4 ++--
drivers/pcmcia/yenta_socket.c | 4 ++--
5 files changed, 7 insertions(+), 7 deletions(-)
@@ -443,7 +443,7 @@ static int bcm63xx_drv_pcmcia_remove(struct platform_device *pdev)
struct resource *res;
skt = platform_get_drvdata(pdev);
- del_timer_sync(&skt->timer);
+ timer_shutdown_sync(&skt->timer);
iounmap(skt->base);
iounmap(skt->io_base);
res = skt->reg_res;
@@ -317,7 +317,7 @@ static int electra_cf_remove(struct platform_device *ofdev)
cf->active = 0;
pcmcia_unregister_socket(&cf->socket);
free_irq(cf->irq, cf);
- del_timer_sync(&cf->timer);
+ timer_shutdown_sync(&cf->timer);
iounmap(cf->io_virt);
iounmap(cf->mem_base);
@@ -296,7 +296,7 @@ static int __exit omap_cf_remove(struct platform_device *pdev)
cf->active = 0;
pcmcia_unregister_socket(&cf->socket);
- del_timer_sync(&cf->timer);
+ timer_shutdown_sync(&cf->timer);
release_mem_region(cf->phys_cf, SZ_8K);
free_irq(cf->irq, cf);
kfree(cf);
@@ -727,7 +727,7 @@ static int pd6729_pci_probe(struct pci_dev *dev,
if (irq_mode == 1)
free_irq(dev->irq, socket);
else
- del_timer_sync(&socket->poll_timer);
+ timer_shutdown_sync(&socket->poll_timer);
err_out_free_res:
pci_release_regions(dev);
err_out_disable:
@@ -754,7 +754,7 @@ static void pd6729_pci_remove(struct pci_dev *dev)
if (irq_mode == 1)
free_irq(dev->irq, socket);
else
- del_timer_sync(&socket->poll_timer);
+ timer_shutdown_sync(&socket->poll_timer);
pci_release_regions(dev);
pci_disable_device(dev);
@@ -814,7 +814,7 @@ static void yenta_close(struct pci_dev *dev)
if (sock->cb_irq)
free_irq(sock->cb_irq, sock);
else
- del_timer_sync(&sock->poll_timer);
+ timer_shutdown_sync(&sock->poll_timer);
iounmap(sock->base);
yenta_free_resources(sock);
@@ -1285,7 +1285,7 @@ static int yenta_probe(struct pci_dev *dev, const struct pci_device_id *id)
if (socket->cb_irq)
free_irq(socket->cb_irq, socket);
else
- del_timer_sync(&socket->poll_timer);
+ timer_shutdown_sync(&socket->poll_timer);
unmap:
iounmap(socket->base);
yenta_free_resources(socket);