Commit 3d6eb1d2 authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman

staging: most: core: remove struct device

This patch takes out the struct device of struct most_aim, because it is
not needed.
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bdafb7e8
...@@ -1304,32 +1304,16 @@ int most_stop_channel(struct most_interface *iface, int id, ...@@ -1304,32 +1304,16 @@ int most_stop_channel(struct most_interface *iface, int id,
} }
EXPORT_SYMBOL_GPL(most_stop_channel); EXPORT_SYMBOL_GPL(most_stop_channel);
void release_aim(struct device *dev)
{
pr_info("releasing aim %s\n", dev_name(dev));
}
/** /**
* most_register_aim - registers an AIM (driver) with the core * most_register_aim - registers an AIM (driver) with the core
* @aim: instance of AIM to be registered * @aim: instance of AIM to be registered
*/ */
int most_register_aim(struct most_aim *aim) int most_register_aim(struct most_aim *aim)
{ {
int ret;
if (!aim) { if (!aim) {
pr_err("Bad driver\n"); pr_err("Bad driver\n");
return -EINVAL; return -EINVAL;
} }
aim->dev.init_name = aim->name;
aim->dev.bus = &mc.bus;
aim->dev.parent = &mc.dev;
aim->dev.release = release_aim;
ret = device_register(&aim->dev);
if (ret) {
pr_err("registering device %s failed\n", aim->name);
return ret;
}
list_add_tail(&aim->list, &mc.mod_list); list_add_tail(&aim->list, &mc.mod_list);
pr_info("registered new application interfacing module %s\n", aim->name); pr_info("registered new application interfacing module %s\n", aim->name);
return 0; return 0;
...@@ -1361,7 +1345,6 @@ int most_deregister_aim(struct most_aim *aim) ...@@ -1361,7 +1345,6 @@ int most_deregister_aim(struct most_aim *aim)
c->pipe1.aim = NULL; c->pipe1.aim = NULL;
} }
} }
device_unregister(&aim->dev);
list_del(&aim->list); list_del(&aim->list);
pr_info("deregistering application interfacing module %s\n", aim->name); pr_info("deregistering application interfacing module %s\n", aim->name);
return 0; return 0;
......
...@@ -262,7 +262,6 @@ struct most_interface { ...@@ -262,7 +262,6 @@ struct most_interface {
* @context: context pointer to be used by mostcore * @context: context pointer to be used by mostcore
*/ */
struct most_aim { struct most_aim {
struct device dev;
struct list_head list; struct list_head list;
const char *name; const char *name;
int (*probe_channel)(struct most_interface *iface, int channel_idx, int (*probe_channel)(struct most_interface *iface, int channel_idx,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment