aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-23 17:24:28 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-28 01:07:49 -0400
commitb15a21dddad552f7e42ae8a7da84de334f6acdcf (patch)
treeb4df1a4342e77fc0c24b5ce82a877c2f450682d0
parent4c33dea7816a115a9bbcd7d9001674c7c3ba71ea (diff)
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> Acked-by: Alex Elder <elder@linaro.org> Cc: <ceph-devel@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/block/rbd.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 4ad2ad9a5bb0..191cd177fef2 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -397,15 +397,19 @@ static ssize_t rbd_remove(struct bus_type *bus, const char *buf,
397static int rbd_dev_image_probe(struct rbd_device *rbd_dev, bool mapping); 397static int rbd_dev_image_probe(struct rbd_device *rbd_dev, bool mapping);
398static void rbd_spec_put(struct rbd_spec *spec); 398static void rbd_spec_put(struct rbd_spec *spec);
399 399
400static struct bus_attribute rbd_bus_attrs[] = { 400static BUS_ATTR(add, S_IWUSR, NULL, rbd_add);
401 __ATTR(add, S_IWUSR, NULL, rbd_add), 401static BUS_ATTR(remove, S_IWUSR, NULL, rbd_remove);
402 __ATTR(remove, S_IWUSR, NULL, rbd_remove), 402
403 __ATTR_NULL 403static struct attribute *rbd_bus_attrs[] = {
404 &bus_attr_add.attr,
405 &bus_attr_remove.attr,
406 NULL,
404}; 407};
408ATTRIBUTE_GROUPS(rbd_bus);
405 409
406static struct bus_type rbd_bus_type = { 410static struct bus_type rbd_bus_type = {
407 .name = "rbd", 411 .name = "rbd",
408 .bus_attrs = rbd_bus_attrs, 412 .bus_groups = rbd_bus_groups,
409}; 413};
410 414
411static void rbd_root_dev_release(struct device *dev) 415static void rbd_root_dev_release(struct device *dev)