Commit e696c683 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: serio - fix sysfs layout

Restore previous layout of sysfs attributes that was broken by commit
3778a212 (input: serio: remove bus usage of
dev_attrs) which moved all serio device attributes into 'id' group, when
only 'type', 'proto', 'id', and 'extra' should be in 'id' group and the
rest of attributes should be attached directly to the device.
Reported-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Tested-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 5d43889c
...@@ -455,16 +455,26 @@ static DEVICE_ATTR_RO(type); ...@@ -455,16 +455,26 @@ static DEVICE_ATTR_RO(type);
static DEVICE_ATTR_RO(proto); static DEVICE_ATTR_RO(proto);
static DEVICE_ATTR_RO(id); static DEVICE_ATTR_RO(id);
static DEVICE_ATTR_RO(extra); static DEVICE_ATTR_RO(extra);
static DEVICE_ATTR_RO(modalias);
static DEVICE_ATTR_WO(drvctl);
static DEVICE_ATTR(description, S_IRUGO, serio_show_description, NULL);
static DEVICE_ATTR(bind_mode, S_IWUSR | S_IRUGO, serio_show_bind_mode, serio_set_bind_mode);
static struct attribute *serio_device_id_attrs[] = { static struct attribute *serio_device_id_attrs[] = {
&dev_attr_type.attr, &dev_attr_type.attr,
&dev_attr_proto.attr, &dev_attr_proto.attr,
&dev_attr_id.attr, &dev_attr_id.attr,
&dev_attr_extra.attr, &dev_attr_extra.attr,
NULL
};
static struct attribute_group serio_id_attr_group = {
.name = "id",
.attrs = serio_device_id_attrs,
};
static DEVICE_ATTR_RO(modalias);
static DEVICE_ATTR_WO(drvctl);
static DEVICE_ATTR(description, S_IRUGO, serio_show_description, NULL);
static DEVICE_ATTR(bind_mode, S_IWUSR | S_IRUGO, serio_show_bind_mode, serio_set_bind_mode);
static struct attribute *serio_device_attrs[] = {
&dev_attr_modalias.attr, &dev_attr_modalias.attr,
&dev_attr_description.attr, &dev_attr_description.attr,
&dev_attr_drvctl.attr, &dev_attr_drvctl.attr,
...@@ -472,13 +482,13 @@ static struct attribute *serio_device_id_attrs[] = { ...@@ -472,13 +482,13 @@ static struct attribute *serio_device_id_attrs[] = {
NULL NULL
}; };
static struct attribute_group serio_id_attr_group = { static struct attribute_group serio_device_attr_group = {
.name = "id", .attrs = serio_device_attrs,
.attrs = serio_device_id_attrs,
}; };
static const struct attribute_group *serio_device_attr_groups[] = { static const struct attribute_group *serio_device_attr_groups[] = {
&serio_id_attr_group, &serio_id_attr_group,
&serio_device_attr_group,
NULL NULL
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment