提交 fdbdc0e6 编写于 作者: C Christian Gromm 提交者: Greg Kroah-Hartman

staging: most: core: denote modules as components

Substrings containing 'module' are replaced with 'component' by this patch.
It is needed to complete the process of changing the module designator from
AIM to Component.
Signed-off-by: NChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 b7937dc4
...@@ -520,7 +520,7 @@ static const struct attribute_group *interface_attr_groups[] = { ...@@ -520,7 +520,7 @@ static const struct attribute_group *interface_attr_groups[] = {
NULL, NULL,
}; };
static struct core_component *match_module(char *name) static struct core_component *match_component(char *name)
{ {
struct core_component *comp; struct core_component *comp;
...@@ -565,7 +565,7 @@ static ssize_t links_show(struct device_driver *drv, char *buf) ...@@ -565,7 +565,7 @@ static ssize_t links_show(struct device_driver *drv, char *buf)
return strlen(buf); return strlen(buf);
} }
static ssize_t modules_show(struct device_driver *drv, char *buf) static ssize_t components_show(struct device_driver *drv, char *buf)
{ {
struct core_component *comp; struct core_component *comp;
int offs = 0; int offs = 0;
...@@ -714,7 +714,7 @@ static ssize_t add_link_store(struct device_driver *drv, ...@@ -714,7 +714,7 @@ static ssize_t add_link_store(struct device_driver *drv,
ret = split_string(buffer, &mdev, &mdev_ch, &comp_name, &comp_param); ret = split_string(buffer, &mdev, &mdev_ch, &comp_name, &comp_param);
if (ret) if (ret)
return ret; return ret;
comp = match_module(comp_name); comp = match_component(comp_name);
if (!comp_param || *comp_param == 0) { if (!comp_param || *comp_param == 0) {
snprintf(devnod_buf, sizeof(devnod_buf), "%s-%s", mdev, snprintf(devnod_buf, sizeof(devnod_buf), "%s-%s", mdev,
mdev_ch); mdev_ch);
...@@ -758,7 +758,7 @@ static ssize_t remove_link_store(struct device_driver *drv, ...@@ -758,7 +758,7 @@ static ssize_t remove_link_store(struct device_driver *drv,
ret = split_string(buffer, &mdev, &mdev_ch, &comp_name, NULL); ret = split_string(buffer, &mdev, &mdev_ch, &comp_name, NULL);
if (ret) if (ret)
return ret; return ret;
comp = match_module(comp_name); comp = match_component(comp_name);
c = get_channel(mdev, mdev_ch); c = get_channel(mdev, mdev_ch);
if (!c) if (!c)
return -ENODEV; return -ENODEV;
...@@ -775,24 +775,24 @@ static ssize_t remove_link_store(struct device_driver *drv, ...@@ -775,24 +775,24 @@ static ssize_t remove_link_store(struct device_driver *drv,
#define DRV_ATTR(_name) (&driver_attr_##_name.attr) #define DRV_ATTR(_name) (&driver_attr_##_name.attr)
static DRIVER_ATTR_RO(links); static DRIVER_ATTR_RO(links);
static DRIVER_ATTR_RO(modules); static DRIVER_ATTR_RO(components);
static DRIVER_ATTR_WO(add_link); static DRIVER_ATTR_WO(add_link);
static DRIVER_ATTR_WO(remove_link); static DRIVER_ATTR_WO(remove_link);
static struct attribute *module_attrs[] = { static struct attribute *mc_attrs[] = {
DRV_ATTR(links), DRV_ATTR(links),
DRV_ATTR(modules), DRV_ATTR(components),
DRV_ATTR(add_link), DRV_ATTR(add_link),
DRV_ATTR(remove_link), DRV_ATTR(remove_link),
NULL, NULL,
}; };
static struct attribute_group module_attr_group = { static struct attribute_group mc_attr_group = {
.attrs = module_attrs, .attrs = mc_attrs,
}; };
static const struct attribute_group *module_attr_groups[] = { static const struct attribute_group *mc_attr_groups[] = {
&module_attr_group, &mc_attr_group,
NULL, NULL,
}; };
...@@ -1552,7 +1552,7 @@ static int __init most_init(void) ...@@ -1552,7 +1552,7 @@ static int __init most_init(void)
mc.bus.match = most_match, mc.bus.match = most_match,
mc.drv.name = "most_core", mc.drv.name = "most_core",
mc.drv.bus = &mc.bus, mc.drv.bus = &mc.bus,
mc.drv.groups = module_attr_groups; mc.drv.groups = mc_attr_groups;
err = bus_register(&mc.bus); err = bus_register(&mc.bus);
if (err) { if (err) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册