[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>
This commit is contained in:
parent
42f6384fe4
commit
55e7071a3c
|
@ -2680,28 +2680,16 @@ static int __init sx_init(void)
|
||||||
static void __exit sx_exit (void)
|
static void __exit sx_exit (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct sx_board *board;
|
|
||||||
|
|
||||||
func_enter();
|
func_enter();
|
||||||
#ifdef CONFIG_EISA
|
#ifdef CONFIG_EISA
|
||||||
eisa_driver_unregister(&sx_eisadriver);
|
eisa_driver_unregister(&sx_eisadriver);
|
||||||
#endif
|
#endif
|
||||||
pci_unregister_driver(&sx_pcidriver);
|
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 */
|
for (i = 0; i < SX_NBOARDS; i++)
|
||||||
del_timer (& board->timer);
|
sx_remove_card(&boards[i]);
|
||||||
iounmap(board->base);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (misc_deregister(&sx_fw_device) < 0) {
|
if (misc_deregister(&sx_fw_device) < 0) {
|
||||||
printk (KERN_INFO "sx: couldn't deregister firmware loader device\n");
|
printk (KERN_INFO "sx: couldn't deregister firmware loader device\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue