From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, Ohad Ben-Cohen <ohad@wizery.com>,
linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH 05/16] rpmsg: use dev_groups and not dev_attrs for bus_type
Date: Tue, 6 Jun 2017 12:33:09 -0700 [thread overview]
Message-ID: <20170606193309.GH12920@tuxbook> (raw)
In-Reply-To: <20170606192221.1617-6-gregkh@linuxfoundation.org>
On Tue 06 Jun 12:22 PDT 2017, Greg Kroah-Hartman wrote:
> The dev_attrs field has long been "depreciated" and is finally being
> removed, so move the driver to use the "correct" dev_groups field
> instead for struct bus_type.
>
> Cc: Ohad Ben-Cohen <ohad@wizery.com>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: <linux-remoteproc@vger.kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Thanks for cleaning this up.
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
> drivers/rpmsg/rpmsg_core.c | 23 +++++++++++++----------
> 1 file changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c
> index 600f5f9f7431..ad3d2a9df287 100644
> --- a/drivers/rpmsg/rpmsg_core.c
> +++ b/drivers/rpmsg/rpmsg_core.c
> @@ -330,7 +330,8 @@ field##_show(struct device *dev, \
> struct rpmsg_device *rpdev = to_rpmsg_device(dev); \
> \
> return sprintf(buf, format_string, rpdev->path); \
> -}
> +} \
> +static DEVICE_ATTR_RO(field);
>
> /* for more info, see Documentation/ABI/testing/sysfs-bus-rpmsg */
> rpmsg_show_attr(name, id.name, "%s\n");
> @@ -345,15 +346,17 @@ static ssize_t modalias_show(struct device *dev,
>
> return sprintf(buf, RPMSG_DEVICE_MODALIAS_FMT "\n", rpdev->id.name);
> }
> -
> -static struct device_attribute rpmsg_dev_attrs[] = {
> - __ATTR_RO(name),
> - __ATTR_RO(modalias),
> - __ATTR_RO(dst),
> - __ATTR_RO(src),
> - __ATTR_RO(announce),
> - __ATTR_NULL
> +static DEVICE_ATTR_RO(modalias);
> +
> +static struct attribute *rpmsg_dev_attrs[] = {
> + &dev_attr_name.attr,
> + &dev_attr_modalias.attr,
> + &dev_attr_dst.attr,
> + &dev_attr_src.attr,
> + &dev_attr_announce.attr,
> + NULL,
> };
> +ATTRIBUTE_GROUPS(rpmsg_dev);
>
> /* rpmsg devices and drivers are matched using the service name */
> static inline int rpmsg_id_match(const struct rpmsg_device *rpdev,
> @@ -455,7 +458,7 @@ static int rpmsg_dev_remove(struct device *dev)
> static struct bus_type rpmsg_bus = {
> .name = "rpmsg",
> .match = rpmsg_dev_match,
> - .dev_attrs = rpmsg_dev_attrs,
> + .dev_groups = rpmsg_dev_groups,
> .uevent = rpmsg_uevent,
> .probe = rpmsg_dev_probe,
> .remove = rpmsg_dev_remove,
> --
> 2.13.0
>
next prev parent reply other threads:[~2017-06-06 19:33 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 19:22 [PATCH 00/16] Driver core: remove bus_type.dev_attrs Greg Kroah-Hartman
2017-06-06 19:22 ` [PATCH 01/16] arm: ecard: use dev_groups and not dev_attrs for bus_type Greg Kroah-Hartman
2017-06-06 19:22 ` [PATCH 02/16] mips: sgi-ip22: " Greg Kroah-Hartman
2017-06-06 19:22 ` [PATCH 03/16] parisc: parisc_bus_type: " Greg Kroah-Hartman
2017-06-06 19:22 ` [PATCH 04/16] amba: " Greg Kroah-Hartman
2017-06-06 19:22 ` [PATCH 05/16] rpmsg: " Greg Kroah-Hartman
2017-06-06 19:33 ` Bjorn Andersson [this message]
2017-06-06 19:22 ` [PATCH 06/16] sh: superhyway: " Greg Kroah-Hartman
2017-06-06 19:22 ` [PATCH 07/16] macintosh: " Greg Kroah-Hartman
2017-06-06 19:22 ` [PATCH 08/16] powerpc: ps3: " Greg Kroah-Hartman
2017-06-06 21:33 ` Geoff Levand
2017-06-07 10:17 ` Greg Kroah-Hartman
2017-06-06 19:22 ` [PATCH 09/16] powerpc: ibmebus: " Greg Kroah-Hartman
2017-06-06 19:22 ` [PATCH 10/16] powerpc: vio: " Greg Kroah-Hartman
2017-06-06 19:30 ` Greg Kroah-Hartman
2017-06-06 23:04 ` Benjamin Herrenschmidt
2017-06-07 5:45 ` Greg Kroah-Hartman
2017-06-07 5:56 ` Benjamin Herrenschmidt
2017-06-07 8:58 ` [PATCH 10/16 v2] " Greg Kroah-Hartman
2017-06-06 19:22 ` [PATCH 11/16] powerpc: vio_cmo: " Greg Kroah-Hartman
2017-06-08 13:12 ` Michael Ellerman
2017-06-08 13:39 ` Greg Kroah-Hartman
2017-06-08 22:53 ` Michael Ellerman
2017-06-09 5:44 ` Greg Kroah-Hartman
2017-06-09 11:23 ` Michael Ellerman
2017-06-10 12:48 ` Greg Kroah-Hartman
2017-06-12 6:58 ` Greg Kroah-Hartman
2017-06-13 10:09 ` Michael Ellerman
2017-06-06 19:22 ` [PATCH 12/16] hwtracing: intel_th: " Greg Kroah-Hartman
2017-06-06 19:22 ` [PATCH 13/16] hid: intel-ish-hid: " Greg Kroah-Hartman
2017-06-06 22:33 ` Srinivas Pandruvada
2017-06-07 13:40 ` Jiri Kosina
2017-06-06 19:22 ` [PATCH 14/16] sparc: vio: " Greg Kroah-Hartman
2017-06-06 19:36 ` David Miller
2017-06-06 19:22 ` [PATCH 15/16] tty: serdev: " Greg Kroah-Hartman
2017-06-09 23:56 ` Stephen Rothwell
2017-06-10 0:01 ` Stephen Rothwell
2017-06-10 11:58 ` Greg Kroah-Hartman
2017-06-06 19:22 ` [PATCH 16/16] driver-core: remove struct bus_type.dev_attrs Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170606193309.GH12920@tuxbook \
--to=bjorn.andersson@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=ohad@wizery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).