diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2009-09-10 09:50:12 -0400 |
---|---|---|
committer | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2009-11-06 06:31:18 -0500 |
commit | cb6b3763571570ebde1e82524c8a45a4275c8f11 (patch) | |
tree | 5a611b829f9758a49a538160607199816fefa78f | |
parent | a9966b580a3e9d7cf820b5360b574f439d813ef4 (diff) |
ieee802154: merge nl802154 and wpan-class in single module
There is no real need to have ieee802154 interfaces separate
into several small modules, as neither of them has it's own use.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
-rw-r--r-- | net/ieee802154/Makefile | 4 | ||||
-rw-r--r-- | net/ieee802154/netlink.c | 9 | ||||
-rw-r--r-- | net/ieee802154/wpan-class.c | 23 |
3 files changed, 24 insertions, 12 deletions
diff --git a/net/ieee802154/Makefile b/net/ieee802154/Makefile index 4068a9f5113e..42b1f0dc138e 100644 --- a/net/ieee802154/Makefile +++ b/net/ieee802154/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | obj-$(CONFIG_IEEE802154) += nl802154.o af_802154.o wpan-class.o | 1 | obj-$(CONFIG_IEEE802154) += ieee802154.o af_802154.o |
2 | nl802154-y := netlink.o nl_policy.o | 2 | ieee802154-y := netlink.o nl_policy.o wpan-class.o |
3 | af_802154-y := af_ieee802154.o raw.o dgram.o | 3 | af_802154-y := af_ieee802154.o raw.o dgram.o |
4 | 4 | ||
5 | ccflags-y += -Wall -DDEBUG | 5 | ccflags-y += -Wall -DDEBUG |
diff --git a/net/ieee802154/netlink.c b/net/ieee802154/netlink.c index ca767bde17a4..0fadd6bd77f6 100644 --- a/net/ieee802154/netlink.c +++ b/net/ieee802154/netlink.c | |||
@@ -643,7 +643,7 @@ static struct genl_ops ieee802154_coordinator_ops[] = { | |||
643 | ieee802154_dump_iface), | 643 | ieee802154_dump_iface), |
644 | }; | 644 | }; |
645 | 645 | ||
646 | static int __init ieee802154_nl_init(void) | 646 | int __init ieee802154_nl_init(void) |
647 | { | 647 | { |
648 | int rc; | 648 | int rc; |
649 | int i; | 649 | int i; |
@@ -676,14 +676,9 @@ fail: | |||
676 | genl_unregister_family(&ieee802154_coordinator_family); | 676 | genl_unregister_family(&ieee802154_coordinator_family); |
677 | return rc; | 677 | return rc; |
678 | } | 678 | } |
679 | module_init(ieee802154_nl_init); | ||
680 | 679 | ||
681 | static void __exit ieee802154_nl_exit(void) | 680 | void __exit ieee802154_nl_exit(void) |
682 | { | 681 | { |
683 | genl_unregister_family(&ieee802154_coordinator_family); | 682 | genl_unregister_family(&ieee802154_coordinator_family); |
684 | } | 683 | } |
685 | module_exit(ieee802154_nl_exit); | ||
686 | |||
687 | MODULE_LICENSE("GPL v2"); | ||
688 | MODULE_DESCRIPTION("ieee 802.15.4 configuration interface"); | ||
689 | 684 | ||
diff --git a/net/ieee802154/wpan-class.c b/net/ieee802154/wpan-class.c index cd42e88b8397..38bac70cca10 100644 --- a/net/ieee802154/wpan-class.c +++ b/net/ieee802154/wpan-class.c | |||
@@ -22,6 +22,8 @@ | |||
22 | 22 | ||
23 | #include <net/wpan-phy.h> | 23 | #include <net/wpan-phy.h> |
24 | 24 | ||
25 | #include "ieee802154.h" | ||
26 | |||
25 | #define MASTER_SHOW_COMPLEX(name, format_string, args...) \ | 27 | #define MASTER_SHOW_COMPLEX(name, format_string, args...) \ |
26 | static ssize_t name ## _show(struct device *dev, \ | 28 | static ssize_t name ## _show(struct device *dev, \ |
27 | struct device_attribute *attr, char *buf) \ | 29 | struct device_attribute *attr, char *buf) \ |
@@ -188,16 +190,31 @@ EXPORT_SYMBOL(wpan_phy_free); | |||
188 | 190 | ||
189 | static int __init wpan_phy_class_init(void) | 191 | static int __init wpan_phy_class_init(void) |
190 | { | 192 | { |
191 | return class_register(&wpan_phy_class); | 193 | int rc; |
194 | rc = class_register(&wpan_phy_class); | ||
195 | if (rc) | ||
196 | goto err; | ||
197 | |||
198 | rc = ieee802154_nl_init(); | ||
199 | if (rc) | ||
200 | goto err_nl; | ||
201 | |||
202 | return 0; | ||
203 | err_nl: | ||
204 | class_unregister(&wpan_phy_class); | ||
205 | err: | ||
206 | return rc; | ||
192 | } | 207 | } |
193 | subsys_initcall(wpan_phy_class_init); | 208 | module_init(wpan_phy_class_init); |
194 | 209 | ||
195 | static void __exit wpan_phy_class_exit(void) | 210 | static void __exit wpan_phy_class_exit(void) |
196 | { | 211 | { |
212 | ieee802154_nl_exit(); | ||
197 | class_unregister(&wpan_phy_class); | 213 | class_unregister(&wpan_phy_class); |
198 | } | 214 | } |
199 | module_exit(wpan_phy_class_exit); | 215 | module_exit(wpan_phy_class_exit); |
200 | 216 | ||
201 | MODULE_DESCRIPTION("IEEE 802.15.4 device class"); | ||
202 | MODULE_LICENSE("GPL v2"); | 217 | MODULE_LICENSE("GPL v2"); |
218 | MODULE_DESCRIPTION("IEEE 802.15.4 configuration interface"); | ||
219 | MODULE_AUTHOR("Dmitry Eremin-Solenikov"); | ||
203 | 220 | ||