diff options
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) | |||
2680 | static void __exit sx_exit (void) | 2680 | static void __exit sx_exit (void) |
2681 | { | 2681 | { |
2682 | int i; | 2682 | int i; |
2683 | struct sx_board *board; | ||
2684 | 2683 | ||
2685 | func_enter(); | 2684 | func_enter(); |
2686 | #ifdef CONFIG_EISA | 2685 | #ifdef CONFIG_EISA |
2687 | eisa_driver_unregister(&sx_eisadriver); | 2686 | eisa_driver_unregister(&sx_eisadriver); |
2688 | #endif | 2687 | #endif |
2689 | pci_unregister_driver(&sx_pcidriver); | 2688 | pci_unregister_driver(&sx_pcidriver); |
2690 | for (i = 0; i < SX_NBOARDS; i++) { | ||
2691 | board = &boards[i]; | ||
2692 | if (board->flags & SX_BOARD_INITIALIZED) { | ||
2693 | sx_dprintk (SX_DEBUG_CLEANUP, "Cleaning up board at %p\n", board->base); | ||
2694 | /* The board should stop messing with us. | ||
2695 | (actually I mean the interrupt) */ | ||
2696 | sx_reset (board); | ||
2697 | if ((board->irq) && (board->flags & SX_IRQ_ALLOCATED)) | ||
2698 | free_irq (board->irq, board); | ||
2699 | 2689 | ||
2700 | /* It is safe/allowed to del_timer a non-active timer */ | 2690 | for (i = 0; i < SX_NBOARDS; i++) |
2701 | del_timer (& board->timer); | 2691 | sx_remove_card(&boards[i]); |
2702 | iounmap(board->base); | 2692 | |
2703 | } | ||
2704 | } | ||
2705 | if (misc_deregister(&sx_fw_device) < 0) { | 2693 | if (misc_deregister(&sx_fw_device) < 0) { |
2706 | printk (KERN_INFO "sx: couldn't deregister firmware loader device\n"); | 2694 | printk (KERN_INFO "sx: couldn't deregister firmware loader device\n"); |
2707 | } | 2695 | } |