summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/module.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-11-14 17:25:06 +0530
committerGreg Kroah-Hartman <greg@kroah.com>2014-11-14 13:49:04 -0800
commit9ca4d62f15bc8e1977ed2c6c2dfc84449b6ab35f (patch)
tree42b698c1908304c849bb63fd7e54a864c07af781 /drivers/staging/greybus/module.c
parent577f5f974c874228573451b9a521df7962f8b7de (diff)
downloadlinux-9ca4d62f15bc8e1977ed2c6c2dfc84449b6ab35f.tar.gz
linux-9ca4d62f15bc8e1977ed2c6c2dfc84449b6ab35f.tar.bz2
linux-9ca4d62f15bc8e1977ed2c6c2dfc84449b6ab35f.zip
greybus: module: move gb_module_find() to a more logical location
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'drivers/staging/greybus/module.c')
-rw-r--r--drivers/staging/greybus/module.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/staging/greybus/module.c b/drivers/staging/greybus/module.c
index 8cbe65b0c01a..22b35e427926 100644
--- a/drivers/staging/greybus/module.c
+++ b/drivers/staging/greybus/module.c
@@ -44,6 +44,17 @@ const struct greybus_module_id *gb_module_match_id(struct gb_module *gmod,
return NULL;
}
+struct gb_module *gb_module_find(struct greybus_host_device *hd, u8 module_id)
+{
+ struct gb_module *module;
+
+ list_for_each_entry(module, &hd->modules, links)
+ if (module->module_id == module_id)
+ return module;
+
+ return NULL;
+}
+
static void greybus_module_release(struct device *dev)
{
struct gb_module *gmod = to_gb_module(dev);
@@ -132,17 +143,6 @@ void gb_module_destroy(struct gb_module *gmod)
device_del(&gmod->dev);
}
-struct gb_module *gb_module_find(struct greybus_host_device *hd, u8 module_id)
-{
- struct gb_module *module;
-
- list_for_each_entry(module, &hd->modules, links)
- if (module->module_id == module_id)
- return module;
-
- return NULL;
-}
-
int
gb_module_interface_init(struct gb_module *gmod, u8 interface_id, u8 device_id)
{