aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memstick
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-07 21:27:41 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-16 21:40:58 -0400
commitb785464bdbe6a98730f0984c14ec8d4cf7ec9980 (patch)
treeb8dfdd52e99faf0bc4cc729744f13da2ea0a1e89 /drivers/memstick
parent06cf261bf4f0a731e8094b911ff78947d1e602a2 (diff)
memstick: 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 memstick bus code to use the correct field. Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/memstick')
-rw-r--r--drivers/memstick/core/memstick.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c
index ffcb10ac4341..bbf4aea1627d 100644
--- a/drivers/memstick/core/memstick.c
+++ b/drivers/memstick/core/memstick.c
@@ -153,24 +153,24 @@ static ssize_t name##_show(struct device *dev, struct device_attribute *attr, \
153 struct memstick_dev *card = container_of(dev, struct memstick_dev, \ 153 struct memstick_dev *card = container_of(dev, struct memstick_dev, \
154 dev); \ 154 dev); \
155 return sprintf(buf, format, card->id.name); \ 155 return sprintf(buf, format, card->id.name); \
156} 156} \
157static DEVICE_ATTR_RO(name);
157 158
158MEMSTICK_ATTR(type, "%02X"); 159MEMSTICK_ATTR(type, "%02X");
159MEMSTICK_ATTR(category, "%02X"); 160MEMSTICK_ATTR(category, "%02X");
160MEMSTICK_ATTR(class, "%02X"); 161MEMSTICK_ATTR(class, "%02X");
161 162
162#define MEMSTICK_ATTR_RO(name) __ATTR(name, S_IRUGO, name##_show, NULL) 163static struct attribute *memstick_dev_attrs[] = {
163 164 &dev_attr_type.attr,
164static struct device_attribute memstick_dev_attrs[] = { 165 &dev_attr_category.attr,
165 MEMSTICK_ATTR_RO(type), 166 &dev_attr_class.attr,
166 MEMSTICK_ATTR_RO(category), 167 NULL,
167 MEMSTICK_ATTR_RO(class),
168 __ATTR_NULL
169}; 168};
169ATTRIBUTE_GROUPS(memstick_dev);
170 170
171static struct bus_type memstick_bus_type = { 171static struct bus_type memstick_bus_type = {
172 .name = "memstick", 172 .name = "memstick",
173 .dev_attrs = memstick_dev_attrs, 173 .dev_groups = memstick_dev_groups,
174 .match = memstick_bus_match, 174 .match = memstick_bus_match,
175 .uevent = memstick_uevent, 175 .uevent = memstick_uevent,
176 .probe = memstick_device_probe, 176 .probe = memstick_device_probe,