aboutsummaryrefslogtreecommitdiffstats
path: root/memstick-convert-bus-code-to-use-dev_groups.patch
diff options
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-03 16:05:34 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-03 16:05:34 -0800
commit52894f7f35f3c6ad2b3362f021cdee69797d7a79 (patch)
tree798f5b8bfb2a5b23e49fb68002f660b694c4e672 /memstick-convert-bus-code-to-use-dev_groups.patch
parentad2f0a874ca11c77885ea119cc80fe40c7e29eb3 (diff)
downloadpatches-52894f7f35f3c6ad2b3362f021cdee69797d7a79.tar.gz
renames and a new patch
Diffstat (limited to 'memstick-convert-bus-code-to-use-dev_groups.patch')
-rw-r--r--memstick-convert-bus-code-to-use-dev_groups.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/memstick-convert-bus-code-to-use-dev_groups.patch b/memstick-convert-bus-code-to-use-dev_groups.patch
new file mode 100644
index 00000000000000..6d5b1b0d2f3a9b
--- /dev/null
+++ b/memstick-convert-bus-code-to-use-dev_groups.patch
@@ -0,0 +1,52 @@
+From foo@baz Mon Oct 7 18:14:24 PDT 2013
+Date: Mon, 07 Oct 2013 18:14:24 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: 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>
+---
+ drivers/memstick/core/memstick.c | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+--- a/drivers/memstick/core/memstick.c
++++ b/drivers/memstick/core/memstick.c
+@@ -153,24 +153,24 @@ static ssize_t name##_show(struct device
+ struct memstick_dev *card = container_of(dev, struct memstick_dev, \
+ dev); \
+ return sprintf(buf, format, card->id.name); \
+-}
++} \
++static DEVICE_ATTR_RO(name);
+
+ MEMSTICK_ATTR(type, "%02X");
+ MEMSTICK_ATTR(category, "%02X");
+ MEMSTICK_ATTR(class, "%02X");
+
+-#define MEMSTICK_ATTR_RO(name) __ATTR(name, S_IRUGO, name##_show, NULL)
+-
+-static struct device_attribute memstick_dev_attrs[] = {
+- MEMSTICK_ATTR_RO(type),
+- MEMSTICK_ATTR_RO(category),
+- MEMSTICK_ATTR_RO(class),
+- __ATTR_NULL
++static struct attribute *memstick_dev_attrs[] = {
++ &dev_attr_type.attr,
++ &dev_attr_category.attr,
++ &dev_attr_class.attr,
++ NULL,
+ };
++ATTRIBUTE_GROUPS(memstick_dev);
+
+ static struct bus_type memstick_bus_type = {
+ .name = "memstick",
+- .dev_attrs = memstick_dev_attrs,
++ .dev_groups = memstick_dev_groups,
+ .match = memstick_bus_match,
+ .uevent = memstick_uevent,
+ .probe = memstick_device_probe,