public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: <linux-kernel@vger.kernel.org>
Cc: <R.E.Wolff@BitWizard.nl>
Cc: <support@specialix.co.uk>
Subject: [PATCH 2/9] Char: sx, remove duplicite code
Date: Tue, 31 Oct 2006 01:41:44 +0100 (CET)	[thread overview]
Message-ID: <1701114104574583@karneval.cz> (raw)

sx, remove duplicite code

sx_remove_code contents were used twice. Call this function instead.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>

---
commit d5dabf3057e62f7d07844832090500348543222a
tree 2d657b4a7528636ca2b741f1b3a8bcfa10befe1e
parent fc64499da1089393cd1fa7f4ae079b6ba02b9c43
author Jiri Slaby <jirislaby@gmail.com> Tue, 31 Oct 2006 00:37:00 +0100
committer Jiri Slaby <jirislaby@gmail.com> Tue, 31 Oct 2006 00:37:00 +0100

 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 42427f4..ca6d518 100644
--- a/drivers/char/sx.c
+++ b/drivers/char/sx.c
@@ -2680,28 +2680,16 @@ #endif
 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");
 	}

                 reply	other threads:[~2006-10-31  0:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1701114104574583@karneval.cz \
    --to=jirislaby@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox