mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +01:00
device: Convert to using IWD_MODULE
This commit is contained in:
parent
978e538f81
commit
03ff5ef7d0
@ -457,7 +457,7 @@ void device_remove(struct device *device)
|
||||
l_free(device);
|
||||
}
|
||||
|
||||
bool device_init(void)
|
||||
static int device_init(void)
|
||||
{
|
||||
if (!l_dbus_register_interface(dbus_get_bus(),
|
||||
IWD_DEVICE_INTERFACE,
|
||||
@ -467,12 +467,14 @@ bool device_init(void)
|
||||
|
||||
netdev_watch = netdev_watch_add(device_netdev_notify, NULL, NULL);
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void device_exit(void)
|
||||
static void device_exit(void)
|
||||
{
|
||||
netdev_watch_remove(netdev_watch);
|
||||
|
||||
l_dbus_unregister_interface(dbus_get_bus(), IWD_DEVICE_INTERFACE);
|
||||
}
|
||||
|
||||
IWD_MODULE(device, device_init, device_exit)
|
||||
|
@ -33,9 +33,6 @@ void netdev_exit(void);
|
||||
void netdev_set_nl80211(struct l_genl_family *nl80211);
|
||||
void netdev_shutdown(void);
|
||||
|
||||
bool device_init(void);
|
||||
void device_exit(void);
|
||||
|
||||
bool manager_init(struct l_genl_family *in,
|
||||
const char *if_whitelist, const char *if_blacklist);
|
||||
void manager_exit(void);
|
||||
|
@ -521,21 +521,15 @@ int main(int argc, char *argv[])
|
||||
if (!netdev_init())
|
||||
goto fail_netdev;
|
||||
|
||||
if (!device_init())
|
||||
goto fail_device;
|
||||
|
||||
if (iwd_modules_init() < 0)
|
||||
goto fail_modules;
|
||||
|
||||
plugin_init(plugins, noplugins);
|
||||
exit_status = l_main_run_with_signal(signal_handler, NULL);
|
||||
|
||||
plugin_exit();
|
||||
|
||||
fail_modules:
|
||||
iwd_modules_exit();
|
||||
device_exit();
|
||||
fail_device:
|
||||
netdev_exit();
|
||||
fail_netdev:
|
||||
rfkill_exit();
|
||||
|
Loading…
Reference in New Issue
Block a user