mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-31 23:42:52 +01:00
wsc: Convert to use IWD_MODULE
This commit is contained in:
parent
4cfcb9c88d
commit
23b278ef52
@ -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);
|
||||
|
||||
|
@ -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:
|
||||
|
10
src/wsc.c
10
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)
|
||||
|
Loading…
Reference in New Issue
Block a user