Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[linux-drm-fsl-dcu.git] / drivers / block / rbd.c
index 2f00778e102484caf22e1f316f478ee2363fbc93..cb1db2979d3d7b5417a8a4b131e09c5c5f6767c0 100644 (file)
@@ -397,15 +397,19 @@ static ssize_t rbd_remove(struct bus_type *bus, const char *buf,
 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)
@@ -5156,7 +5160,7 @@ static ssize_t rbd_remove(struct bus_type *bus,
        bool already = false;
        int ret;
 
-       ret = strict_strtoul(buf, 10, &ul);
+       ret = kstrtoul(buf, 10, &ul);
        if (ret)
                return ret;