From: Andrey Shvetsov <andrey.shvetsov@xxxxxx> This patch replaces the use of a macro create_inst_attribute for the attribute value with a macro __ATTR_RO. Additionally, this patch removes not anymore used macros MOST_INST_ATTR and create_inst_attribute. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@xxxxxx> Signed-off-by: Christian Gromm <christian.gromm@xxxxxxxxxxxxx> --- drivers/staging/most/mostcore/core.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c index a9fd896c9a9e..f3a2dc4f4b47 100644 --- a/drivers/staging/most/mostcore/core.c +++ b/drivers/staging/most/mostcore/core.c @@ -562,9 +562,6 @@ create_most_c_obj(const char *name, struct kobject *parent) /* ___ ___ * ___I N S T A N C E___ */ -#define MOST_INST_ATTR(_name, _mode, _show, _store) \ - struct most_inst_attribute most_inst_attr_##_name = \ - __ATTR(_name, _mode, _show, _store) static struct list_head instance_list; @@ -652,7 +649,7 @@ static void most_inst_release(struct kobject *kobj) kfree(inst); } -static ssize_t show_description(struct most_inst_obj *instance_obj, +static ssize_t description_show(struct most_inst_obj *instance_obj, struct most_inst_attribute *attr, char *buf) { @@ -687,10 +684,8 @@ static ssize_t interface_show(struct most_inst_obj *instance_obj, return snprintf(buf, PAGE_SIZE, "unknown\n"); } -#define create_inst_attribute(value) \ - static MOST_INST_ATTR(value, 0444, show_##value, NULL) - -create_inst_attribute(description); +static struct most_inst_attribute most_inst_attr_description = + __ATTR_RO(description); static struct most_inst_attribute most_inst_attr_interface = __ATTR_RO(interface); -- 2.11.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel