Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1659125 > unrolled thread

[PATCH 08/16] powerpc: ps3: use dev_groups and not dev_attrs for bus_type

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-06-06 21:30 +0200
Last post2017-06-07 12:20 +0200
Articles 3 — 2 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.


Contents

  [PATCH 08/16] powerpc: ps3: use dev_groups and not dev_attrs for bus_type Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-06 21:30 +0200
    Re: [PATCH 08/16] powerpc: ps3: use dev_groups and not dev_attrs for  bus_type Geoff Levand <geoff@infradead.org> - 2017-06-06 23:40 +0200
    Re: [PATCH 08/16] powerpc: ps3: use dev_groups and not dev_attrs for  bus_type Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-07 12:20 +0200

#1659125 — [PATCH 08/16] powerpc: ps3: use dev_groups and not dev_attrs for bus_type

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-06 21:30 +0200
Subject[PATCH 08/16] powerpc: ps3: use dev_groups and not dev_attrs for bus_type
Message-ID<tPskW-4zc-25@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: Geoff Levand <geoff@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: <linuxppc-dev@lists.ozlabs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/powerpc/platforms/ps3/system-bus.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index 2d2e5f80a3d3..3e98b4ea3df9 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -471,11 +471,13 @@ static ssize_t modalias_show(struct device *_dev, struct device_attribute *a,
 
 	return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
 }
+static DEVICE_ATTR_RO(modalias);
 
-static struct device_attribute ps3_system_bus_dev_attrs[] = {
-	__ATTR_RO(modalias),
-	__ATTR_NULL,
+static struct attribute *ps3_system_bus_dev_attrs[] = {
+	&dev_attr_modalias.attr,
+	NULL,
 };
+ATTRIBUTE_GROUPS(ps3_system_bus);
 
 struct bus_type ps3_system_bus_type = {
 	.name = "ps3_system_bus",
@@ -484,7 +486,7 @@ struct bus_type ps3_system_bus_type = {
 	.probe = ps3_system_bus_probe,
 	.remove = ps3_system_bus_remove,
 	.shutdown = ps3_system_bus_shutdown,
-	.dev_attrs = ps3_system_bus_dev_attrs,
+	.dev_groups = ps3_system_bus_dev_groups,
 };
 
 static int __init ps3_system_bus_init(void)
-- 
2.13.0

[toc] | [next] | [standalone]


#1659243 — Re: [PATCH 08/16] powerpc: ps3: use dev_groups and not dev_attrs for bus_type

FromGeoff Levand <geoff@infradead.org>
Date2017-06-06 23:40 +0200
SubjectRe: [PATCH 08/16] powerpc: ps3: use dev_groups and not dev_attrs for bus_type
Message-ID<tPumK-5Ri-27@gated-at.bofh.it>
In reply to#1659125
On 06/06/2017 12:22 PM, 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.

>  arch/powerpc/platforms/ps3/system-bus.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)

Seems OK.

-Geoff

[toc] | [prev] | [next] | [standalone]


#1659647 — Re: [PATCH 08/16] powerpc: ps3: use dev_groups and not dev_attrs for bus_type

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-07 12:20 +0200
SubjectRe: [PATCH 08/16] powerpc: ps3: use dev_groups and not dev_attrs for bus_type
Message-ID<tPGed-5it-5@gated-at.bofh.it>
In reply to#1659125
On Tue, Jun 06, 2017 at 09:22:13PM +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: Geoff Levand <geoff@infradead.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: <linuxppc-dev@lists.ozlabs.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  arch/powerpc/platforms/ps3/system-bus.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
> index 2d2e5f80a3d3..3e98b4ea3df9 100644
> --- a/arch/powerpc/platforms/ps3/system-bus.c
> +++ b/arch/powerpc/platforms/ps3/system-bus.c
> @@ -471,11 +471,13 @@ static ssize_t modalias_show(struct device *_dev, struct device_attribute *a,
>  
>  	return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
>  }
> +static DEVICE_ATTR_RO(modalias);
>  
> -static struct device_attribute ps3_system_bus_dev_attrs[] = {
> -	__ATTR_RO(modalias),
> -	__ATTR_NULL,
> +static struct attribute *ps3_system_bus_dev_attrs[] = {
> +	&dev_attr_modalias.attr,
> +	NULL,
>  };
> +ATTRIBUTE_GROUPS(ps3_system_bus);

This should be:
ATTRIBUTE_GROUPS(ps3_system_bus_dev);

I've fixed it up and am now running it through 0-day.

thanks,

greg k-h

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web