lkml.org 
[lkml]   [2004]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] kill useless exports and bookkeeping in bt878.c
 - 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 =====
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.035 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site