diff options
-rw-r--r-- | drivers/staging/most/core.c | 6 | ||||
-rw-r--r-- | drivers/staging/most/core.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c index 779464a58674..41a35382a9e3 100644 --- a/drivers/staging/most/core.c +++ b/drivers/staging/most/core.c @@ -1294,8 +1294,8 @@ int most_register_aim(struct most_aim *aim) pr_err("registering device %s failed\n", aim->name); return ret; } - pr_info("registered new application interfacing module %s\n", - aim->name); + list_add_tail(&aim->list, &mc.mod_list); + pr_info("registered new application interfacing module %s\n", aim->name); return 0; } EXPORT_SYMBOL_GPL(most_register_aim); @@ -1326,6 +1326,7 @@ int most_deregister_aim(struct most_aim *aim) } } device_unregister(&aim->dev); + list_del(&aim->list); pr_info("deregistering application interfacing module %s\n", aim->name); return 0; } @@ -1545,6 +1546,7 @@ static int __init most_init(void) pr_info("init()\n"); INIT_LIST_HEAD(&instance_list); + INIT_LIST_HEAD(&mc.mod_list); ida_init(&mdev_id); mc.bus.name = "most", diff --git a/drivers/staging/most/core.h b/drivers/staging/most/core.h index 29595d9ef7ed..845e1d63d8fc 100644 --- a/drivers/staging/most/core.h +++ b/drivers/staging/most/core.h @@ -263,6 +263,7 @@ struct most_interface { */ struct most_aim { struct device dev; + struct list_head list; const char *name; int (*probe_channel)(struct most_interface *iface, int channel_idx, struct most_channel_config *cfg, char *name); |