NULL,
};
-/* sysfs example for bridge-only sysfs files using device_type's */
-static const struct attribute_group visorbus_dev_group = {
- .attrs = visorbus_dev_attrs,
-};
-
-static const struct attribute_group *visorbus_dev_groups[] = {
- &visorbus_dev_group,
- NULL,
-};
+ATTRIBUTE_GROUPS(visorbus_dev);
/* filled in with info about parent chipset driver when we register with it */
static struct visor_vbus_deviceinfo chipset_driverinfo;
NULL
};
-static const struct attribute_group channel_attr_grp = {
- .name = "channel",
- .attrs = channel_attrs,
-};
-
-static const struct attribute_group *visorbus_channel_groups[] = {
- &channel_attr_grp,
- NULL
-};
+ATTRIBUTE_GROUPS(channel);
/* end implementation of specific channel attributes */
}
static DEVICE_ATTR_RO(channel_id);
-static struct attribute *dev_attrs[] = {
+static struct attribute *visorbus_attrs[] = {
&dev_attr_partition_handle.attr,
&dev_attr_partition_guid.attr,
&dev_attr_partition_name.attr,
NULL
};
-static const struct attribute_group dev_attr_grp = {
- .attrs = dev_attrs,
-};
-
-static const struct attribute_group *visorbus_groups[] = {
- &dev_attr_grp,
- NULL
-};
+ATTRIBUTE_GROUPS(visorbus);
/*
* BUS debugfs entries
mutex_init(&dev->visordriver_callback_lock);
dev->device.bus = &visorbus_type;
- dev->device.groups = visorbus_channel_groups;
+ dev->device.groups = channel_groups;
device_initialize(&dev->device);
dev->device.release = visorbus_release_device;
/* keep a reference just for us (now 2) */