commit 23b278ef529f5c0415608dc992ee6e205662911f
parent 4cfcb9c88d35dd58543733be035b33fdeb75071f
Author: Denis Kenzior <denkenz@gmail.com>
Date: Wed, 22 May 2019 10:01:53 -0500
wsc: Convert to use IWD_MODULE
Diffstat:
3 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/src/iwd.h b/src/iwd.h
@@ -33,9 +33,6 @@ void netdev_exit(void);
void netdev_set_nl80211(struct l_genl_family *nl80211);
void netdev_shutdown(void);
-bool wsc_init(void);
-bool wsc_exit();
-
bool device_init(void);
void device_exit(void);
diff --git a/src/main.c b/src/main.c
@@ -525,7 +525,6 @@ int main(int argc, char *argv[])
goto fail_device;
station_init();
- wsc_init();
if (iwd_modules_init() < 0)
goto fail_modules;
@@ -537,7 +536,6 @@ int main(int argc, char *argv[])
fail_modules:
iwd_modules_exit();
- wsc_exit();
station_exit();
device_exit();
fail_device:
diff --git a/src/wsc.c b/src/wsc.c
@@ -1100,21 +1100,21 @@ static void wsc_netdev_watch(struct netdev *netdev,
}
}
-bool wsc_init(void)
+static int wsc_init(void)
{
l_debug("");
netdev_watch = netdev_watch_add(wsc_netdev_watch, NULL, NULL);
l_dbus_register_interface(dbus_get_bus(), IWD_WSC_INTERFACE,
setup_wsc_interface,
wsc_free, false);
- return true;
+ return 0;
}
-bool wsc_exit()
+static void wsc_exit(void)
{
l_debug("");
l_dbus_unregister_interface(dbus_get_bus(), IWD_WSC_INTERFACE);
netdev_watch_remove(netdev_watch);
-
- return true;
}
+
+IWD_MODULE(wsc, wsc_init, wsc_exit)