aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-12-08 05:39:03 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:58 -0500
commit55e7071a3c6cdb65fb5ce3ea9c692a8d78ed0844 (patch)
tree2bff1d8e5313129c7f5e99514adb0f0dce59b885
parent42f6384fe4747f65dc27e8a5f96502204558203b (diff)
[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>
-rw-r--r--drivers/char/sx.c18
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)
2680static void __exit sx_exit (void) 2680static 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 }