diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2006-12-08 11:39:03 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 17:28:58 +0100 |
commit | 55e7071a3c6cdb65fb5ce3ea9c692a8d78ed0844 (patch) | |
tree | 2bff1d8e5313129c7f5e99514adb0f0dce59b885 /drivers/char/sx.c | |
parent | [PATCH] Char: sx, lock boards struct (diff) | |
download | linux-55e7071a3c6cdb65fb5ce3ea9c692a8d78ed0844.tar.xz linux-55e7071a3c6cdb65fb5ce3ea9c692a8d78ed0844.zip |
[PATCH] Char: sx, remove duplicite code
sx_remove_code contents were used twice. Call this function instead.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/sx.c')
-rw-r--r-- | drivers/char/sx.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/char/sx.c b/drivers/char/sx.c index 42427f4d2ebd..ca6d51895013 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c @@ -2680,28 +2680,16 @@ static int __init sx_init(void) static void __exit sx_exit (void) { int i; - struct sx_board *board; func_enter(); #ifdef CONFIG_EISA eisa_driver_unregister(&sx_eisadriver); #endif pci_unregister_driver(&sx_pcidriver); - for (i = 0; i < SX_NBOARDS; i++) { - board = &boards[i]; - if (board->flags & SX_BOARD_INITIALIZED) { - sx_dprintk (SX_DEBUG_CLEANUP, "Cleaning up board at %p\n", board->base); - /* The board should stop messing with us. - (actually I mean the interrupt) */ - sx_reset (board); - if ((board->irq) && (board->flags & SX_IRQ_ALLOCATED)) - free_irq (board->irq, board); - /* It is safe/allowed to del_timer a non-active timer */ - del_timer (& board->timer); - iounmap(board->base); - } - } + for (i = 0; i < SX_NBOARDS; i++) + sx_remove_card(&boards[i]); + if (misc_deregister(&sx_fw_device) < 0) { printk (KERN_INFO "sx: couldn't deregister firmware loader device\n"); } |