* [PATCH 02/15] rbd: convert bus code to use bus_groups
[not found] <1377293081-10957-1-git-send-email-gregkh@linuxfoundation.org>
@ 2013-08-23 21:24 ` Greg Kroah-Hartman
2013-08-27 12:35 ` Alex Elder
0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2013-08-23 21:24 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, Yehuda Sadeh, Sage Weil, Alex Elder,
ceph-devel
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(-)
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 4ad2ad9a..191cd177 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,
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)
--
1.8.3.rc0.20.gb99dd2e
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 02/15] rbd: convert bus code to use bus_groups
2013-08-23 21:24 ` [PATCH 02/15] rbd: convert bus code to use bus_groups Greg Kroah-Hartman
@ 2013-08-27 12:35 ` Alex Elder
2013-08-28 5:07 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Alex Elder @ 2013-08-27 12:35 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Yehuda Sadeh, Sage Weil, Alex Elder, ceph-devel
On 08/23/2013 04:24 PM, Greg Kroah-Hartman wrote:
> 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>
Looks reasonable to me.
Acked-by: Alex Elder <elder@linaro.org>
> 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(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index 4ad2ad9a..191cd177 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,
> 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)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 02/15] rbd: convert bus code to use bus_groups
2013-08-27 12:35 ` Alex Elder
@ 2013-08-28 5:07 ` Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2013-08-28 5:07 UTC (permalink / raw)
To: Alex Elder; +Cc: linux-kernel, Yehuda Sadeh, Sage Weil, Alex Elder, ceph-devel
On Tue, Aug 27, 2013 at 07:35:32AM -0500, Alex Elder wrote:
> On 08/23/2013 04:24 PM, Greg Kroah-Hartman wrote:
> > 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>
>
> Looks reasonable to me.
>
> Acked-by: Alex Elder <elder@linaro.org>
Thanks for the review.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-28 5:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1377293081-10957-1-git-send-email-gregkh@linuxfoundation.org>
2013-08-23 21:24 ` [PATCH 02/15] rbd: convert bus code to use bus_groups Greg Kroah-Hartman
2013-08-27 12:35 ` Alex Elder
2013-08-28 5:07 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox