aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-01-10 16:10:02 -0500
committerDavid S. Miller <davem@davemloft.net>2006-01-10 16:10:02 -0500
commit214ad78437544b20c3c0d5c2acb24650ce6e4db8 (patch)
tree3e4b62bb43fb36bc0f1151038c1f458ff8f43fbc
parent79a34648e488a41be92369c72aa9784bd4d741f9 (diff)
[IRDA]: 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 <bunk@stusta.de> Acked-by: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/irda/Makefile2
-rw-r--r--drivers/net/irda/sir-dev.h2
-rw-r--r--drivers/net/irda/sir_core.c56
-rw-r--r--drivers/net/irda/sir_dev.c10
-rw-r--r--drivers/net/irda/sir_dongle.c2
-rw-r--r--drivers/net/irda/sir_kthread.c11
6 files changed, 21 insertions, 62 deletions
diff --git a/drivers/net/irda/Makefile b/drivers/net/irda/Makefile
index e7a8b7f7f5dd..72cbfdc9cfcc 100644
--- a/drivers/net/irda/Makefile
+++ b/drivers/net/irda/Makefile
@@ -45,4 +45,4 @@ obj-$(CONFIG_ACT200L_DONGLE) += act200l-sir.o
45obj-$(CONFIG_MA600_DONGLE) += ma600-sir.o 45obj-$(CONFIG_MA600_DONGLE) += ma600-sir.o
46 46
47# The SIR helper module 47# The SIR helper module
48sir-dev-objs := sir_core.o sir_dev.o sir_dongle.o sir_kthread.o 48sir-dev-objs := sir_dev.o sir_dongle.o sir_kthread.o
diff --git a/drivers/net/irda/sir-dev.h b/drivers/net/irda/sir-dev.h
index f0b8bc3637e5..f69fb4cec76f 100644
--- a/drivers/net/irda/sir-dev.h
+++ b/drivers/net/irda/sir-dev.h
@@ -133,8 +133,6 @@ extern int sirdev_put_dongle(struct sir_dev *self);
133 133
134extern void sirdev_enable_rx(struct sir_dev *dev); 134extern void sirdev_enable_rx(struct sir_dev *dev);
135extern int sirdev_schedule_request(struct sir_dev *dev, int state, unsigned param); 135extern int sirdev_schedule_request(struct sir_dev *dev, int state, unsigned param);
136extern int __init irda_thread_create(void);
137extern void __exit irda_thread_join(void);
138 136
139/* inline helpers */ 137/* inline helpers */
140 138
diff --git a/drivers/net/irda/sir_core.c b/drivers/net/irda/sir_core.c
deleted file mode 100644
index a49f910c835b..000000000000
--- a/drivers/net/irda/sir_core.c
+++ /dev/null
@@ -1,56 +0,0 @@
1/*********************************************************************
2 *
3 * sir_core.c: module core for irda-sir abstraction layer
4 *
5 * Copyright (c) 2002 Martin Diehl
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 ********************************************************************/
13
14#include <linux/module.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17
18#include <net/irda/irda.h>
19
20#include "sir-dev.h"
21
22/***************************************************************************/
23
24MODULE_AUTHOR("Martin Diehl <info@mdiehl.de>");
25MODULE_DESCRIPTION("IrDA SIR core");
26MODULE_LICENSE("GPL");
27
28/***************************************************************************/
29
30EXPORT_SYMBOL(irda_register_dongle);
31EXPORT_SYMBOL(irda_unregister_dongle);
32
33EXPORT_SYMBOL(sirdev_get_instance);
34EXPORT_SYMBOL(sirdev_put_instance);
35
36EXPORT_SYMBOL(sirdev_set_dongle);
37EXPORT_SYMBOL(sirdev_write_complete);
38EXPORT_SYMBOL(sirdev_receive);
39
40EXPORT_SYMBOL(sirdev_raw_write);
41EXPORT_SYMBOL(sirdev_raw_read);
42EXPORT_SYMBOL(sirdev_set_dtr_rts);
43
44static int __init sir_core_init(void)
45{
46 return irda_thread_create();
47}
48
49static void __exit sir_core_exit(void)
50{
51 irda_thread_join();
52}
53
54module_init(sir_core_init);
55module_exit(sir_core_exit);
56
diff --git a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c
index df22b8b532e7..ea7c9464d46a 100644
--- a/drivers/net/irda/sir_dev.c
+++ b/drivers/net/irda/sir_dev.c
@@ -60,6 +60,7 @@ int sirdev_set_dongle(struct sir_dev *dev, IRDA_DONGLE type)
60 up(&dev->fsm.sem); 60 up(&dev->fsm.sem);
61 return err; 61 return err;
62} 62}
63EXPORT_SYMBOL(sirdev_set_dongle);
63 64
64/* used by dongle drivers for dongle programming */ 65/* used by dongle drivers for dongle programming */
65 66
@@ -94,6 +95,7 @@ int sirdev_raw_write(struct sir_dev *dev, const char *buf, int len)
94 spin_unlock_irqrestore(&dev->tx_lock, flags); 95 spin_unlock_irqrestore(&dev->tx_lock, flags);
95 return ret; 96 return ret;
96} 97}
98EXPORT_SYMBOL(sirdev_raw_write);
97 99
98/* seems some dongle drivers may need this */ 100/* seems some dongle drivers may need this */
99 101
@@ -116,6 +118,7 @@ int sirdev_raw_read(struct sir_dev *dev, char *buf, int len)
116 118
117 return count; 119 return count;
118} 120}
121EXPORT_SYMBOL(sirdev_raw_read);
119 122
120int sirdev_set_dtr_rts(struct sir_dev *dev, int dtr, int rts) 123int sirdev_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)
121{ 124{
@@ -124,7 +127,8 @@ int sirdev_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)
124 ret = dev->drv->set_dtr_rts(dev, dtr, rts); 127 ret = dev->drv->set_dtr_rts(dev, dtr, rts);
125 return ret; 128 return ret;
126} 129}
127 130EXPORT_SYMBOL(sirdev_set_dtr_rts);
131
128/**********************************************************************/ 132/**********************************************************************/
129 133
130/* called from client driver - likely with bh-context - to indicate 134/* called from client driver - likely with bh-context - to indicate
@@ -227,6 +231,7 @@ void sirdev_write_complete(struct sir_dev *dev)
227done: 231done:
228 spin_unlock_irqrestore(&dev->tx_lock, flags); 232 spin_unlock_irqrestore(&dev->tx_lock, flags);
229} 233}
234EXPORT_SYMBOL(sirdev_write_complete);
230 235
231/* called from client driver - likely with bh-context - to give us 236/* called from client driver - likely with bh-context - to give us
232 * some more received bytes. We put them into the rx-buffer, 237 * some more received bytes. We put them into the rx-buffer,
@@ -279,6 +284,7 @@ int sirdev_receive(struct sir_dev *dev, const unsigned char *cp, size_t count)
279 284
280 return 0; 285 return 0;
281} 286}
287EXPORT_SYMBOL(sirdev_receive);
282 288
283/**********************************************************************/ 289/**********************************************************************/
284 290
@@ -641,6 +647,7 @@ out_freenetdev:
641out: 647out:
642 return NULL; 648 return NULL;
643} 649}
650EXPORT_SYMBOL(sirdev_get_instance);
644 651
645int sirdev_put_instance(struct sir_dev *dev) 652int sirdev_put_instance(struct sir_dev *dev)
646{ 653{
@@ -673,4 +680,5 @@ int sirdev_put_instance(struct sir_dev *dev)
673 680
674 return 0; 681 return 0;
675} 682}
683EXPORT_SYMBOL(sirdev_put_instance);
676 684
diff --git a/drivers/net/irda/sir_dongle.c b/drivers/net/irda/sir_dongle.c
index c5b76746e72b..8d225921ae7b 100644
--- a/drivers/net/irda/sir_dongle.c
+++ b/drivers/net/irda/sir_dongle.c
@@ -50,6 +50,7 @@ int irda_register_dongle(struct dongle_driver *new)
50 up(&dongle_list_lock); 50 up(&dongle_list_lock);
51 return 0; 51 return 0;
52} 52}
53EXPORT_SYMBOL(irda_register_dongle);
53 54
54int irda_unregister_dongle(struct dongle_driver *drv) 55int irda_unregister_dongle(struct dongle_driver *drv)
55{ 56{
@@ -58,6 +59,7 @@ int irda_unregister_dongle(struct dongle_driver *drv)
58 up(&dongle_list_lock); 59 up(&dongle_list_lock);
59 return 0; 60 return 0;
60} 61}
62EXPORT_SYMBOL(irda_unregister_dongle);
61 63
62int sirdev_get_dongle(struct sir_dev *dev, IRDA_DONGLE type) 64int sirdev_get_dongle(struct sir_dev *dev, IRDA_DONGLE type)
63{ 65{
diff --git a/drivers/net/irda/sir_kthread.c b/drivers/net/irda/sir_kthread.c
index c65054364bca..e3904d6bfecd 100644
--- a/drivers/net/irda/sir_kthread.c
+++ b/drivers/net/irda/sir_kthread.c
@@ -466,7 +466,7 @@ int sirdev_schedule_request(struct sir_dev *dev, int initial_state, unsigned par
466 return 0; 466 return 0;
467} 467}
468 468
469int __init irda_thread_create(void) 469static int __init irda_thread_create(void)
470{ 470{
471 struct completion startup; 471 struct completion startup;
472 int pid; 472 int pid;
@@ -488,7 +488,7 @@ int __init irda_thread_create(void)
488 return 0; 488 return 0;
489} 489}
490 490
491void __exit irda_thread_join(void) 491static void __exit irda_thread_join(void)
492{ 492{
493 if (irda_rq_queue.thread) { 493 if (irda_rq_queue.thread) {
494 flush_irda_queue(); 494 flush_irda_queue();
@@ -499,3 +499,10 @@ void __exit irda_thread_join(void)
499 } 499 }
500} 500}
501 501
502module_init(irda_thread_create);
503module_exit(irda_thread_join);
504
505MODULE_AUTHOR("Martin Diehl <info@mdiehl.de>");
506MODULE_DESCRIPTION("IrDA SIR core");
507MODULE_LICENSE("GPL");
508