kill drivers/net/irda/sir_core.c
Subsystems (2)
PATCH 1/1 kill drivers/net/irda/sir_core.c
EXPORT_SYMBOL's do nowadays belong to the files where the actual functions are.
Moving the module_init/module_exit to the file with the actual functions has the advantage of saving a few bytes due to the removal of two functions.
Signed-off-by Adrian Bunk <[email protected]>
---
drivers/net/irda/Makefile | 2 - drivers/net/irda/sir-dev.h | 2 - drivers/net/irda/sir_core.c | 56 --------------------------------- drivers/net/irda/sir_dev.c | 10 +++++ drivers/net/irda/sir_dongle.c | 2 + drivers/net/irda/sir_kthread.c | 11 +++++- 6 files changed, 21 insertions(+), 62 deletions(-)
drivers/net/irda/Makefile renamed from drivers/net/irda/Makefile.old +1 -1
@@ -45,4 +45,4 @@ obj-$(CONFIG_MA600_DONGLE) += ma600-sir.o # The SIR helper module -sir-dev-objs := sir_core.o sir_dev.o sir_dongle.o sir_kthread.o +sir-dev-objs := sir_dev.o sir_dongle.o sir_kthread.o
drivers/net/irda/sir-dev.h renamed from drivers/net/irda/sir-dev.h.old +0 -2
@@ -133,8 +133,6 @@extern void sirdev_enable_rx (struct sir_dev *dev);extern int sirdev_schedule_request (struct sir_dev *dev,int state,unsigned param); -extern int __init irda_thread_create (void ); -extern void __exit irda_thread_join(void);/* inline helpers */
drivers/net/irda/sir_kthread.c renamed from drivers/net/irda/sir_kthread.c.old +9 -2
@@ -466,7 +466,7 @@return 0 ; } -int __init irda_thread_create (void ) +static int __init irda_thread_create (void ) {struct completion startup;int pid;
@@ -488,7 +488,7 @@return 0 ; } -void __exit irda_thread_join(void) +static void __exit irda_thread_join(void) {if (irda_rq_queue.thread) {flush_irda_queue ();
@@ -499,3 +499,10 @@ } } +module_init (irda_thread_create); +module_exit (irda_thread_join); + +MODULE_AUTHOR ("Martin Diehl <[email protected]>" ); +MODULE_DESCRIPTION ("IrDA SIR core" ); +MODULE_LICENSE ("GPL" ); +
drivers/net/irda/sir_dongle.c renamed from drivers/net/irda/sir_dongle.c.old +2 -0
@@ -50,6 +50,7 @@up (&dongle_list_lock);return 0 ; } +EXPORT_SYMBOL (irda_register_dongle);int irda_unregister_dongle (struct dongle_driver *drv) {
@@ -58,6 +59,7 @@up (&dongle_list_lock);return 0 ; } +EXPORT_SYMBOL (irda_unregister_dongle);int sirdev_get_dongle (struct sir_dev *dev,IRDA_DONGLE type) {
drivers/net/irda/sir_dev.c renamed from drivers/net/irda/sir_dev.c.old +9 -1
@@ -60,6 +60,7 @@up (&dev->fsm.sem);return err; } +EXPORT_SYMBOL (sirdev_set_dongle);/* used by dongle drivers for dongle programming */
@@ -94,6 +95,7 @@spin_unlock_irqrestore (&dev->tx_lock, flags);return ret; } +EXPORT_SYMBOL (sirdev_raw_write);/* seems some dongle drivers may need this */
@@ -116,6 +118,7 @@return count; } +EXPORT_SYMBOL (sirdev_raw_read);int sirdev_set_dtr_rts (struct sir_dev *dev,int dtr,int rts) {
@@ -124,7 +127,8 @@ ret = dev->drv->set_dtr_rts (dev, dtr, rts);return ret; } - +EXPORT_SYMBOL (sirdev_set_dtr_rts); +/**********************************************************************/ /* called from client driver - likely with bh-context - to indicate
@@ -227,6 +231,7 @@ done:spin_unlock_irqrestore (&dev->tx_lock, flags); } +EXPORT_SYMBOL (sirdev_write_complete);/* called from client driver - likely with bh-context - to give us * some more received bytes. We put them into the rx-buffer,
@@ -279,6 +284,7 @@return 0 ; } +EXPORT_SYMBOL (sirdev_receive);/**********************************************************************/
@@ -641,6 +647,7 @@ out:return NULL ; } +EXPORT_SYMBOL (sirdev_get_instance);int sirdev_put_instance (struct sir_dev *dev) {
@@ -673,4 +680,5 @@return 0 ; } +EXPORT_SYMBOL (sirdev_put_instance);
drivers/net/irda/sir_core.c deleted +0 -56
56 lines not on this page · raw message
Quoted 9 lines · Adrian Bunk
EXPORT_SYMBOL's do nowadays belong to the files where the actual functions are.
Moving the module_init/module_exit to the file with the actual functions has the advantage of saving a few bytes due to the removal of two functions.
Signed-off-by Adrian Bunk <[email protected]>
Go for it.
Jean