aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee802154/wpan-class.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ieee802154/wpan-class.c')
-rw-r--r--net/ieee802154/wpan-class.c23
1 files changed, 20 insertions, 3 deletions
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...) \
26static ssize_t name ## _show(struct device *dev, \ 28static 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
189static int __init wpan_phy_class_init(void) 191static 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;
203err_nl:
204 class_unregister(&wpan_phy_class);
205err:
206 return rc;
192} 207}
193subsys_initcall(wpan_phy_class_init); 208module_init(wpan_phy_class_init);
194 209
195static void __exit wpan_phy_class_exit(void) 210static 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}
199module_exit(wpan_phy_class_exit); 215module_exit(wpan_phy_class_exit);
200 216
201MODULE_DESCRIPTION("IEEE 802.15.4 device class");
202MODULE_LICENSE("GPL v2"); 217MODULE_LICENSE("GPL v2");
218MODULE_DESCRIPTION("IEEE 802.15.4 configuration interface");
219MODULE_AUTHOR("Dmitry Eremin-Solenikov");
203 220