From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Christian Gromm Subject: [PATCH 03/13] staging: most: use __ATTR_RO for the attribute interface Date: Fri, 31 Mar 2017 15:22:24 +0200 Message-ID: <20170331132234.21722-3-christian.gromm@microchip.com> In-Reply-To: <20170331132234.21722-1-christian.gromm@microchip.com> References: <20170331132234.21722-1-christian.gromm@microchip.com> MIME-Version: 1.0 Content-Type: text/plain List-ID: To: gregkh@linuxfoundation.org Cc: driverdev-devel@linuxdriverproject.org, Andrey Shvetsov , Christian Gromm From: Andrey Shvetsov 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 Signed-off-by: Christian Gromm --- 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