mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kill useless exports and bookkeeping in bt878.c
@ 2004-10-24 13:11 Christoph Hellwig
  0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2004-10-24 13:11 UTC (permalink / raw)
  To: peter.hettkamp; +Cc: linux-kernel

 - 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 =====

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-24 13:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-24 13:11 [PATCH] kill useless exports and bookkeeping in bt878.c Christoph Hellwig

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®