aboutsummaryrefslogtreecommitdiffstats
path: root/rbd-convert-bus-code-to-use-bus_groups.patch
diff options
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-23 13:25:27 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-23 13:25:27 -0700
commitf2fea6a31b09a12fe4d9e9e3f9a8e2be017ad611 (patch)
treec16afc7b5e4b92cb361c6d2b3ec6f0e9a780a476 /rbd-convert-bus-code-to-use-bus_groups.patch
parente930b8544abee8d7894d5f55af16cb5e7be25f9f (diff)
downloadpatches-f2fea6a31b09a12fe4d9e9e3f9a8e2be017ad611.tar.gz
updates
Diffstat (limited to 'rbd-convert-bus-code-to-use-bus_groups.patch')
-rw-r--r--rbd-convert-bus-code-to-use-bus_groups.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/rbd-convert-bus-code-to-use-bus_groups.patch b/rbd-convert-bus-code-to-use-bus_groups.patch
new file mode 100644
index 00000000000000..788c1bf82336dd
--- /dev/null
+++ b/rbd-convert-bus-code-to-use-bus_groups.patch
@@ -0,0 +1,46 @@
+From foo@baz Fri Aug 23 13:16:26 PDT 2013
+Date: Fri, 23 Aug 2013 13:16:26 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: rbd: convert bus code to use bus_groups
+
+The bus_attrs field of struct bus_type is going away soon, dev_groups
+should be used instead. This converts the RBD bus code to use the
+correct field.
+
+Cc: Yehuda Sadeh <yehuda@inktank.com>
+Cc: Sage Weil <sage@inktank.com>
+Cc: Alex Elder <elder@inktank.com>
+Cc: <ceph-devel@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/block/rbd.c | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+--- a/drivers/block/rbd.c
++++ b/drivers/block/rbd.c
+@@ -397,15 +397,19 @@ static ssize_t rbd_remove(struct bus_typ
+ static int rbd_dev_image_probe(struct rbd_device *rbd_dev, bool mapping);
+ static void rbd_spec_put(struct rbd_spec *spec);
+
+-static struct bus_attribute rbd_bus_attrs[] = {
+- __ATTR(add, S_IWUSR, NULL, rbd_add),
+- __ATTR(remove, S_IWUSR, NULL, rbd_remove),
+- __ATTR_NULL
++static BUS_ATTR(add, S_IWUSR, NULL, rbd_add);
++static BUS_ATTR(remove, S_IWUSR, NULL, rbd_remove);
++
++static struct attribute *rbd_bus_attrs[] = {
++ &bus_attr_add.attr,
++ &bus_attr_remove.attr,
++ NULL,
+ };
++ATTRIBUTE_GROUPS(rbd_bus);
+
+ static struct bus_type rbd_bus_type = {
+ .name = "rbd",
+- .bus_attrs = rbd_bus_attrs,
++ .bus_groups = rbd_bus_groups,
+ };
+
+ static void rbd_root_dev_release(struct device *dev)