Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tifm: convert bus code to use dev_groups

The dev_attrs field of struct bus_type is going away soon, dev_groups
should be used instead. This converts the tifm bus code to use the
correct field.

Cc: Alex Dubov <oakad@yahoo.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+6 -4
+6 -4
drivers/misc/tifm_core.c
··· 145 145 struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); 146 146 return sprintf(buf, "%x", sock->type); 147 147 } 148 + static DEVICE_ATTR_RO(type); 148 149 149 - static struct device_attribute tifm_dev_attrs[] = { 150 - __ATTR(type, S_IRUGO, type_show, NULL), 151 - __ATTR_NULL 150 + static struct attribute *tifm_dev_attrs[] = { 151 + &dev_attr_type.attr, 152 + NULL, 152 153 }; 154 + ATTRIBUTE_GROUPS(tifm_dev); 153 155 154 156 static struct bus_type tifm_bus_type = { 155 157 .name = "tifm", 156 - .dev_attrs = tifm_dev_attrs, 158 + .dev_groups = tifm_dev_groups, 157 159 .match = tifm_bus_match, 158 160 .uevent = tifm_uevent, 159 161 .probe = tifm_device_probe,