Commit aa5ebdeb authored by David Kershner's avatar David Kershner Committed by Greg Kroah-Hartman

staging: unisys: use ATTRIBUTE_GROUPS instead of creating our own

Greg noticed that we were creating our own attribute groups, instead of
using the ATTRIBUTE_GROUPS macro, this patch fixes our mistake.
Reported-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarTim Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b74856b4
...@@ -51,15 +51,7 @@ static struct attribute *visorbus_dev_attrs[] = { ...@@ -51,15 +51,7 @@ static struct attribute *visorbus_dev_attrs[] = {
NULL, NULL,
}; };
/* sysfs example for bridge-only sysfs files using device_type's */ ATTRIBUTE_GROUPS(visorbus_dev);
static const struct attribute_group visorbus_dev_group = {
.attrs = visorbus_dev_attrs,
};
static const struct attribute_group *visorbus_dev_groups[] = {
&visorbus_dev_group,
NULL,
};
/* filled in with info about parent chipset driver when we register with it */ /* filled in with info about parent chipset driver when we register with it */
static struct visor_vbus_deviceinfo chipset_driverinfo; static struct visor_vbus_deviceinfo chipset_driverinfo;
...@@ -292,15 +284,7 @@ static struct attribute *channel_attrs[] = { ...@@ -292,15 +284,7 @@ static struct attribute *channel_attrs[] = {
NULL NULL
}; };
static const struct attribute_group channel_attr_grp = { ATTRIBUTE_GROUPS(channel);
.name = "channel",
.attrs = channel_attrs,
};
static const struct attribute_group *visorbus_channel_groups[] = {
&channel_attr_grp,
NULL
};
/* end implementation of specific channel attributes */ /* end implementation of specific channel attributes */
...@@ -379,7 +363,7 @@ static ssize_t channel_id_show(struct device *dev, ...@@ -379,7 +363,7 @@ static ssize_t channel_id_show(struct device *dev,
} }
static DEVICE_ATTR_RO(channel_id); static DEVICE_ATTR_RO(channel_id);
static struct attribute *dev_attrs[] = { static struct attribute *visorbus_attrs[] = {
&dev_attr_partition_handle.attr, &dev_attr_partition_handle.attr,
&dev_attr_partition_guid.attr, &dev_attr_partition_guid.attr,
&dev_attr_partition_name.attr, &dev_attr_partition_name.attr,
...@@ -389,14 +373,7 @@ static struct attribute *dev_attrs[] = { ...@@ -389,14 +373,7 @@ static struct attribute *dev_attrs[] = {
NULL NULL
}; };
static const struct attribute_group dev_attr_grp = { ATTRIBUTE_GROUPS(visorbus);
.attrs = dev_attrs,
};
static const struct attribute_group *visorbus_groups[] = {
&dev_attr_grp,
NULL
};
/* /*
* BUS debugfs entries * BUS debugfs entries
...@@ -666,7 +643,7 @@ int create_visor_device(struct visor_device *dev) ...@@ -666,7 +643,7 @@ int create_visor_device(struct visor_device *dev)
mutex_init(&dev->visordriver_callback_lock); mutex_init(&dev->visordriver_callback_lock);
dev->device.bus = &visorbus_type; dev->device.bus = &visorbus_type;
dev->device.groups = visorbus_channel_groups; dev->device.groups = channel_groups;
device_initialize(&dev->device); device_initialize(&dev->device);
dev->device.release = visorbus_release_device; dev->device.release = visorbus_release_device;
/* keep a reference just for us (now 2) */ /* keep a reference just for us (now 2) */
......
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