Linux Media Controller development
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: LMML <linux-media@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: [PATCH] dvb/bt8xx: Clean-up init and exit functions
Date: Tue, 26 Jan 2010 20:46:58 +0100	[thread overview]
Message-ID: <20100126204658.11047e14@hyperion.delvare> (raw)

From: Jean Delvare <khali@linux-fr.org>
Subject: dvb/bt8xx: Clean-up init and exit functions

The init and exit functions are needlessly complex. Remove the bloat:
* Drop irrelevant/outdated comments.
* Remove useless bt878_pci_driver_registered global variable.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
 linux/drivers/media/dvb/bt8xx/bt878.c |   17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

--- v4l-dvb.orig/linux/drivers/media/dvb/bt8xx/bt878.c	2010-01-26 19:13:38.000000000 +0100
+++ v4l-dvb/linux/drivers/media/dvb/bt8xx/bt878.c	2010-01-26 20:40:37.000000000 +0100
@@ -580,8 +580,6 @@ static struct pci_driver bt878_pci_drive
       .remove	= __devexit_p(bt878_remove),
 };
 
-static int bt878_pci_driver_registered;
-
 /*******************************/
 /* Module management functions */
 /*******************************/
@@ -589,34 +587,23 @@ static int bt878_pci_driver_registered;
 static int __init bt878_init_module(void)
 {
 	bt878_num = 0;
-	bt878_pci_driver_registered = 0;
 
 	printk(KERN_INFO "bt878: AUDIO driver version %d.%d.%d loaded\n",
 	       (BT878_VERSION_CODE >> 16) & 0xff,
 	       (BT878_VERSION_CODE >> 8) & 0xff,
 	       BT878_VERSION_CODE & 0xff);
-/*
-	bt878_check_chipset();
-*/
-	/* later we register inside of bt878_find_audio_dma()
-	 * because we may want to ignore certain cards */
-	bt878_pci_driver_registered = 1;
+
 	return pci_register_driver(&bt878_pci_driver);
 }
 
 static void __exit bt878_cleanup_module(void)
 {
-	if (bt878_pci_driver_registered) {
-		bt878_pci_driver_registered = 0;
-		pci_unregister_driver(&bt878_pci_driver);
-	}
-	return;
+	pci_unregister_driver(&bt878_pci_driver);
 }
 
 module_init(bt878_init_module);
 module_exit(bt878_cleanup_module);
 
-//MODULE_AUTHOR("XXX");
 MODULE_LICENSE("GPL");
 
 /*


-- 
Jean Delvare

                 reply	other threads:[~2010-01-26 19:47 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=20100126204658.11047e14@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.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