diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-07 21:27:40 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-16 21:40:58 -0400 |
commit | 06cf261bf4f0a731e8094b911ff78947d1e602a2 (patch) | |
tree | 51948a3cdc51342b8b3f959729db829311dc617b | |
parent | 3736dab6e5e54c0f769f528f5616c335762bdac2 (diff) |
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>
-rw-r--r-- | drivers/misc/tifm_core.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/misc/tifm_core.c b/drivers/misc/tifm_core.c index 0ab7c922212c..a511b2a713b3 100644 --- a/drivers/misc/tifm_core.c +++ b/drivers/misc/tifm_core.c | |||
@@ -145,15 +145,17 @@ static ssize_t type_show(struct device *dev, struct device_attribute *attr, | |||
145 | struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); | 145 | struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); |
146 | return sprintf(buf, "%x", sock->type); | 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 | static struct attribute *tifm_dev_attrs[] = { |
150 | __ATTR(type, S_IRUGO, type_show, NULL), | 151 | &dev_attr_type.attr, |
151 | __ATTR_NULL | 152 | NULL, |
152 | }; | 153 | }; |
154 | ATTRIBUTE_GROUPS(tifm_dev); | ||
153 | 155 | ||
154 | static struct bus_type tifm_bus_type = { | 156 | static struct bus_type tifm_bus_type = { |
155 | .name = "tifm", | 157 | .name = "tifm", |
156 | .dev_attrs = tifm_dev_attrs, | 158 | .dev_groups = tifm_dev_groups, |
157 | .match = tifm_bus_match, | 159 | .match = tifm_bus_match, |
158 | .uevent = tifm_uevent, | 160 | .uevent = tifm_uevent, |
159 | .probe = tifm_device_probe, | 161 | .probe = tifm_device_probe, |