@@ -23,23 +23,29 @@ static ssize_t name##_show(struct device
/* VCR flags */
superhyway_ro_attr(perr_flags, "0x%02x\n", vcr.perr_flags);
+static DEVICE_ATTR_RO(perr_flags);
superhyway_ro_attr(merr_flags, "0x%02x\n", vcr.merr_flags);
+static DEVICE_ATTR_RO(merr_flags);
superhyway_ro_attr(mod_vers, "0x%04x\n", vcr.mod_vers);
+static DEVICE_ATTR_RO(mod_vers);
superhyway_ro_attr(mod_id, "0x%04x\n", vcr.mod_id);
+static DEVICE_ATTR_RO(mod_id);
superhyway_ro_attr(bot_mb, "0x%02x\n", vcr.bot_mb);
+static DEVICE_ATTR_RO(bot_mb);
superhyway_ro_attr(top_mb, "0x%02x\n", vcr.top_mb);
+static DEVICE_ATTR_RO(top_mb);
/* Misc */
superhyway_ro_attr(resource, "0x%08lx\n", resource[0].start);
+static DEVICE_ATTR_RO(resource);
-struct device_attribute superhyway_dev_attrs[] = {
- __ATTR_RO(perr_flags),
- __ATTR_RO(merr_flags),
- __ATTR_RO(mod_vers),
- __ATTR_RO(mod_id),
- __ATTR_RO(bot_mb),
- __ATTR_RO(top_mb),
- __ATTR_RO(resource),
- __ATTR_NULL,
+struct attribute *superhyway_dev_attrs[] = {
+ &dev_attr_perr_flags.attr,
+ &dev_attr_merr_flags.attr,
+ &dev_attr_mod_vers.attr,
+ &dev_attr_mod_id.attr,
+ &dev_attr_bot_mb.attr,
+ &dev_attr_top_mb.attr,
+ &dev_attr_resource.attr,
+ NULL,
};
-
@@ -205,11 +205,13 @@ static int superhyway_bus_match(struct d
return -ENODEV;
}
+/* superhyway_dev_attrs is defined in superhyway-sysfs.c */
+ATTRIBUTE_GROUPS(superhyway_dev);
struct bus_type superhyway_bus_type = {
.name = "superhyway",
.match = superhyway_bus_match,
#ifdef CONFIG_SYSFS
- .dev_attrs = superhyway_dev_attrs,
+ .dev_groups = superhyway_dev_groups,
#endif
.probe = superhyway_device_probe,
.remove = superhyway_device_remove,
@@ -101,7 +101,7 @@ int superhyway_add_device(unsigned long
int superhyway_add_devices(struct superhyway_bus *bus, struct superhyway_device **devices, int nr_devices);
/* drivers/sh/superhyway/superhyway-sysfs.c */
-extern struct device_attribute superhyway_dev_attrs[];
+extern struct attribute *superhyway_dev_attrs[];
#endif /* __LINUX_SUPERHYWAY_H */
The dev_attrs field of struct bus_type is going away, use dev_groups instead. This converts the soundbus code to use the correct field. These modifications were made using Coccinelle. Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> --- drivers/sh/superhyway/superhyway-sysfs.c | 26 ++++++++++++++++---------- drivers/sh/superhyway/superhyway.c | 4 +++- include/linux/superhyway.h | 2 +- 3 files changed, 20 insertions(+), 12 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html