Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1659135 > unrolled thread
| Started by | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| First post | 2017-06-06 21:30 +0200 |
| Last post | 2017-06-07 15:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 13/16] hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-06 21:30 +0200
Re: [PATCH 13/16] hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2017-06-07 00:40 +0200
Re: [PATCH 13/16] hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type Jiri Kosina <jikos@kernel.org> - 2017-06-07 15:50 +0200
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-06-06 21:30 +0200 |
| Subject | [PATCH 13/16] hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type |
| Message-ID | <tPskX-4zc-47@gated-at.bofh.it> |
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>
---
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,
--
2.13.0
[toc] | [next] | [standalone]
| From | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> |
|---|---|
| Date | 2017-06-07 00:40 +0200 |
| Subject | Re: [PATCH 13/16] hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type |
| Message-ID | <tPviO-6ua-15@gated-at.bofh.it> |
| In reply to | #1659135 |
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,
[toc] | [prev] | [next] | [standalone]
| From | Jiri Kosina <jikos@kernel.org> |
|---|---|
| Date | 2017-06-07 15:50 +0200 |
| Subject | Re: [PATCH 13/16] hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type |
| Message-ID | <tPJvs-7jj-19@gated-at.bofh.it> |
| In reply to | #1659135 |
On Tue, 6 Jun 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: 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: Jiri Kosina <jkosina@suse.cz> -- Jiri Kosina SUSE Labs
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web