diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/irda/Makefile | 2 | ||||
-rw-r--r-- | drivers/net/irda/sir-dev.h | 2 | ||||
-rw-r--r-- | drivers/net/irda/sir_core.c | 56 | ||||
-rw-r--r-- | drivers/net/irda/sir_dev.c | 10 | ||||
-rw-r--r-- | drivers/net/irda/sir_dongle.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/sir_kthread.c | 11 |
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 | |||
45 | obj-$(CONFIG_MA600_DONGLE) += ma600-sir.o | 45 | obj-$(CONFIG_MA600_DONGLE) += ma600-sir.o |
46 | 46 | ||
47 | # The SIR helper module | 47 | # The SIR helper module |
48 | sir-dev-objs := sir_core.o sir_dev.o sir_dongle.o sir_kthread.o | 48 | sir-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 | ||
134 | extern void sirdev_enable_rx(struct sir_dev *dev); | 134 | extern void sirdev_enable_rx(struct sir_dev *dev); |
135 | extern int sirdev_schedule_request(struct sir_dev *dev, int state, unsigned param); | 135 | extern int sirdev_schedule_request(struct sir_dev *dev, int state, unsigned param); |
136 | extern int __init irda_thread_create(void); | ||
137 | extern 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 | |||
24 | MODULE_AUTHOR("Martin Diehl <info@mdiehl.de>"); | ||
25 | MODULE_DESCRIPTION("IrDA SIR core"); | ||
26 | MODULE_LICENSE("GPL"); | ||
27 | |||
28 | /***************************************************************************/ | ||
29 | |||
30 | EXPORT_SYMBOL(irda_register_dongle); | ||
31 | EXPORT_SYMBOL(irda_unregister_dongle); | ||
32 | |||
33 | EXPORT_SYMBOL(sirdev_get_instance); | ||
34 | EXPORT_SYMBOL(sirdev_put_instance); | ||
35 | |||
36 | EXPORT_SYMBOL(sirdev_set_dongle); | ||
37 | EXPORT_SYMBOL(sirdev_write_complete); | ||
38 | EXPORT_SYMBOL(sirdev_receive); | ||
39 | |||
40 | EXPORT_SYMBOL(sirdev_raw_write); | ||
41 | EXPORT_SYMBOL(sirdev_raw_read); | ||
42 | EXPORT_SYMBOL(sirdev_set_dtr_rts); | ||
43 | |||
44 | static int __init sir_core_init(void) | ||
45 | { | ||
46 | return irda_thread_create(); | ||
47 | } | ||
48 | |||
49 | static void __exit sir_core_exit(void) | ||
50 | { | ||
51 | irda_thread_join(); | ||
52 | } | ||
53 | |||
54 | module_init(sir_core_init); | ||
55 | module_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 | } |
63 | EXPORT_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 | } |
98 | EXPORT_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 | } |
121 | EXPORT_SYMBOL(sirdev_raw_read); | ||
119 | 122 | ||
120 | int sirdev_set_dtr_rts(struct sir_dev *dev, int dtr, int rts) | 123 | int 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 | 130 | EXPORT_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) | |||
227 | done: | 231 | done: |
228 | spin_unlock_irqrestore(&dev->tx_lock, flags); | 232 | spin_unlock_irqrestore(&dev->tx_lock, flags); |
229 | } | 233 | } |
234 | EXPORT_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 | } |
287 | EXPORT_SYMBOL(sirdev_receive); | ||
282 | 288 | ||
283 | /**********************************************************************/ | 289 | /**********************************************************************/ |
284 | 290 | ||
@@ -641,6 +647,7 @@ out_freenetdev: | |||
641 | out: | 647 | out: |
642 | return NULL; | 648 | return NULL; |
643 | } | 649 | } |
650 | EXPORT_SYMBOL(sirdev_get_instance); | ||
644 | 651 | ||
645 | int sirdev_put_instance(struct sir_dev *dev) | 652 | int 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 | } |
683 | EXPORT_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 | } |
53 | EXPORT_SYMBOL(irda_register_dongle); | ||
53 | 54 | ||
54 | int irda_unregister_dongle(struct dongle_driver *drv) | 55 | int 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 | } |
62 | EXPORT_SYMBOL(irda_unregister_dongle); | ||
61 | 63 | ||
62 | int sirdev_get_dongle(struct sir_dev *dev, IRDA_DONGLE type) | 64 | int 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 | ||
469 | int __init irda_thread_create(void) | 469 | static 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 | ||
491 | void __exit irda_thread_join(void) | 491 | static 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 | ||
502 | module_init(irda_thread_create); | ||
503 | module_exit(irda_thread_join); | ||
504 | |||
505 | MODULE_AUTHOR("Martin Diehl <info@mdiehl.de>"); | ||
506 | MODULE_DESCRIPTION("IrDA SIR core"); | ||
507 | MODULE_LICENSE("GPL"); | ||
508 | |||