Skip to content

Commit 0c295e4

Browse files
JuliaLawalldavem330
authored andcommitted
isdn: replace del_timer by del_timer_sync
Use del_timer_sync to ensure that the timer is stopped on all CPUs before the driver exists. This change was suggested by Thomas Gleixner. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ declarer name module_exit; identifier ex; @@ module_exit(ex); @@ identifier r.ex; @@ ex(...) { <... - del_timer + del_timer_sync (...) ...> } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a0b8486 commit 0c295e4

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/isdn/act2000/module.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ static void __exit act2000_exit(void)
796796
act2000_card *last;
797797
while (card) {
798798
unregister_card(card);
799-
del_timer(&card->ptimer);
799+
del_timer_sync(&card->ptimer);
800800
card = card->next;
801801
}
802802
card = cards;

‎drivers/isdn/i4l/isdn_common.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2381,7 +2381,7 @@ static void __exit isdn_exit(void)
23812381
}
23822382
isdn_tty_exit();
23832383
unregister_chrdev(ISDN_MAJOR, "isdn");
2384-
del_timer(&dev->timer);
2384+
del_timer_sync(&dev->timer);
23852385
/* call vfree with interrupts enabled, else it will hang */
23862386
vfree(dev);
23872387
printk(KERN_NOTICE "ISDN-subsystem unloaded\n");

‎drivers/isdn/sc/init.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,8 @@ static void __exit sc_exit(void)
390390
/*
391391
* kill the timers
392392
*/
393-
del_timer(&(sc_adapter[i]->reset_timer));
394-
del_timer(&(sc_adapter[i]->stat_timer));
393+
del_timer_sync(&(sc_adapter[i]->reset_timer));
394+
del_timer_sync(&(sc_adapter[i]->stat_timer));
395395

396396
/*
397397
* Tell I4L we're toast

0 commit comments

Comments
 (0)