greybus: quick fix for sysfs serial number

Let the serial number attribute have its own is_visible function.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
Alex Elder 2014-09-23 12:46:32 -05:00 коммит произвёл Greg Kroah-Hartman
Родитель 778c69c9e2
Коммит 380f6bddc9
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -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,
};