]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: most: core: remove struct device
authorChristian Gromm <christian.gromm@microchip.com>
Tue, 21 Nov 2017 14:04:54 +0000 (15:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Nov 2017 08:20:35 +0000 (09:20 +0100)
This patch takes out the struct device of struct most_aim, because it is
not needed.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/core.c
drivers/staging/most/core.h

index 37b9703504cf6bee7eb2a8679e70400a34988b75..076d4f2756ffb7e14d6cb8bf8612a7e7cef6c4d7 100644 (file)
@@ -1304,32 +1304,16 @@ int most_stop_channel(struct most_interface *iface, int id,
 }
 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
  * @aim: instance of AIM to be registered
  */
 int most_register_aim(struct most_aim *aim)
 {
-       int ret;
-
        if (!aim) {
                pr_err("Bad driver\n");
                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);
        pr_info("registered new application interfacing module %s\n", aim->name);
        return 0;
@@ -1361,7 +1345,6 @@ int most_deregister_aim(struct most_aim *aim)
                                c->pipe1.aim = NULL;
                }
        }
-       device_unregister(&aim->dev);
        list_del(&aim->list);
        pr_info("deregistering application interfacing module %s\n", aim->name);
        return 0;
index 845e1d63d8fc26d9b1bd73ea869a78917e003056..2f61a69afb778b1d6a012f633b375c670a1bd1a1 100644 (file)
@@ -262,7 +262,6 @@ struct most_interface {
  * @context: context pointer to be used by mostcore
  */
 struct most_aim {
-       struct device dev;
        struct list_head list;
        const char *name;
        int (*probe_channel)(struct most_interface *iface, int channel_idx,