From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Cc: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Wei Yongjun <weiyj.lk@gmail.com>,
Bhumika Goyal <bhumirks@gmail.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
linux-input@vger.kernel.org
Subject: Re: [PATCH 13/16] hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type
Date: Tue, 06 Jun 2017 15:33:02 -0700 [thread overview]
Message-ID: <1496788382.195383.1.camel@linux.intel.com> (raw)
In-Reply-To: <20170606192221.1617-14-gregkh@linuxfoundation.org>
On Tue, 2017-06-06 at 21:22 +0200, 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: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Cc: Jiri Kosina <jikos@kernel.org>
> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Cc: Wei Yongjun <weiyj.lk@gmail.com>
> Cc: Bhumika Goyal <bhumirks@gmail.com>
> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Cc: <linux-input@vger.kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> drivers/hid/intel-ish-hid/ishtp/bus.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c
> b/drivers/hid/intel-ish-hid/ishtp/bus.c
> index 5f382fedc2ab..f272cdd9bd55 100644
> --- a/drivers/hid/intel-ish-hid/ishtp/bus.c
> +++ b/drivers/hid/intel-ish-hid/ishtp/bus.c
> @@ -321,11 +321,13 @@ static ssize_t modalias_show(struct device
> *dev, struct device_attribute *a,
> len = snprintf(buf, PAGE_SIZE, "ishtp:%s\n", dev_name(dev));
> return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
> }
> +static DEVICE_ATTR_RO(modalias);
>
> -static struct device_attribute ishtp_cl_dev_attrs[] = {
> - __ATTR_RO(modalias),
> - __ATTR_NULL,
> +static struct attribute *ishtp_cl_dev_attrs[] = {
> + &dev_attr_modalias.attr,
> + NULL,
> };
> +ATTRIBUTE_GROUPS(ishtp_cl_dev);
>
> static int ishtp_cl_uevent(struct device *dev, struct
> kobj_uevent_env *env)
> {
> @@ -346,7 +348,7 @@ static const struct dev_pm_ops
> ishtp_cl_bus_dev_pm_ops = {
>
> static struct bus_type ishtp_cl_bus_type = {
> .name = "ishtp",
> - .dev_attrs = ishtp_cl_dev_attrs,
> + .dev_groups = ishtp_cl_dev_groups,
> .probe = ishtp_cl_device_probe,
> .remove = ishtp_cl_device_remove,
> .pm = &ishtp_cl_bus_dev_pm_ops,
next prev parent reply other threads:[~2017-06-06 22:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170606192221.1617-1-gregkh@linuxfoundation.org>
2017-06-06 19:22 ` [PATCH 13/16] hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type Greg Kroah-Hartman
2017-06-06 22:33 ` Srinivas Pandruvada [this message]
2017-06-07 13:40 ` Jiri Kosina
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=1496788382.195383.1.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=benjamin.tissoires@redhat.com \
--cc=bhumirks@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=weiyj.lk@gmail.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).