From: Andrey Shvetsov <andrey.shvet...@k2l.de>

This patch replaces the use of a macro create_inst_attribute for the
attribute interface with a macro __ATTR_RO.

Signed-off-by: Andrey Shvetsov <andrey.shvet...@k2l.de>
Signed-off-by: Christian Gromm <christian.gr...@microchip.com>
---
 drivers/staging/most/mostcore/core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/mostcore/core.c 
b/drivers/staging/most/mostcore/core.c
index fb5e8f2ecb74..a9fd896c9a9e 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -660,7 +660,7 @@ static ssize_t show_description(struct most_inst_obj 
*instance_obj,
                        instance_obj->iface->description);
 }
 
-static ssize_t show_interface(struct most_inst_obj *instance_obj,
+static ssize_t interface_show(struct most_inst_obj *instance_obj,
                              struct most_inst_attribute *attr,
                              char *buf)
 {
@@ -691,7 +691,9 @@ static ssize_t show_interface(struct most_inst_obj 
*instance_obj,
        static MOST_INST_ATTR(value, 0444, show_##value, NULL)
 
 create_inst_attribute(description);
-create_inst_attribute(interface);
+
+static struct most_inst_attribute most_inst_attr_interface =
+       __ATTR_RO(interface);
 
 static struct attribute *most_inst_def_attrs[] = {
        &most_inst_attr_description.attr,
-- 
2.11.0

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to