mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: peter.hettkamp@t-online.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] kill useless exports and bookkeeping in bt878.c
Date: Sun, 24 Oct 2004 15:11:49 +0200	[thread overview]
Message-ID: <20041024131149.GB19567@lst.de> (raw)

 - no point in exporting bt878_init_module and bt878_cleanup_module,
   they are always called on module load/removal
 - bt878_find_audio_dma and the registered bookeeping is utterly
   pointless as a registration always heppens on load anyway


--- 1.6/drivers/media/dvb/bt8xx/bt878.c	2004-10-21 10:39:27 +02:00
+++ edited/drivers/media/dvb/bt8xx/bt878.c	2004-10-23 14:29:35 +02:00
@@ -557,52 +557,24 @@
       .remove 	= __devexit_p(bt878_remove),
 };
 
-static int bt878_pci_driver_registered = 0;
-
-/* This will be used later by dvb-bt8xx to only use the audio
- * dma of certain cards */
-int bt878_find_audio_dma(void)
-{
-	// pci_register_driver(&bt878_pci_driver);
-	bt878_pci_driver_registered = 1;
-	return 0;
-}
-
-EXPORT_SYMBOL(bt878_find_audio_dma);
-
 /*******************************/
 /* Module management functions */
 /*******************************/
 
-int bt878_init_module(void)
+static int 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_module_init(&bt878_pci_driver);
 }
 
-void bt878_cleanup_module(void)
+static void 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);
 }
 
-EXPORT_SYMBOL(bt878_init_module);
-EXPORT_SYMBOL(bt878_cleanup_module);
 module_init(bt878_init_module);
 module_exit(bt878_cleanup_module);
 
===== drivers/media/video/v4l2-common.c 1.4 vs edited =====

                 reply	other threads:[~2004-10-24 13:12 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=20041024131149.GB19567@lst.de \
    --to=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.hettkamp@t-online.de \
    /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

all inboxes | Powered by JetHome®