From: Alex Elder Date: Tue, 23 Sep 2014 17:46:32 +0000 (-0500) Subject: greybus: quick fix for sysfs serial number X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~2089 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=380f6bddc900b9baba8163e5c5f60eabe712f7d0;p=karo-tx-linux.git greybus: quick fix for sysfs serial number Let the serial number attribute have its own is_visible function. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/sysfs.c b/drivers/staging/greybus/sysfs.c index b503d2c4ef28..792a2381c289 100644 --- a/drivers/staging/greybus/sysfs.c +++ b/drivers/staging/greybus/sysfs.c @@ -156,9 +156,15 @@ static struct attribute *serial_number_attrs[] = { NULL, }; +static umode_t serial_number_is_visible(struct kobject *kobj, + struct attribute *a, int n) +{ + return a->mode; +} + static struct attribute_group serial_number_attr_grp = { .attrs = serial_number_attrs, - .is_visible = function_attrs_are_visible, + .is_visible = serial_number_is_visible, };