diff --git a/src/iwd.h b/src/iwd.h index 58b348c8..677b9987 100644 --- 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 index baef63fc..bb1b5ff2 100644 --- 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 index 274ed762..44845223 100644 --- 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)