linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] parisc: pdc_stable: use default_groups in kobj_type
@ 2022-01-06  9:51 Greg Kroah-Hartman
  2022-01-06 14:17 ` Helge Deller
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Kroah-Hartman @ 2022-01-06  9:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, James E.J. Bottomley, Helge Deller, linux-parisc

There are currently 2 ways to create a set of sysfs files for a
kobj_type, through the default_attrs field, and the default_groups
field.  Move the parisc pdc_stable sysfs code to use default_groups
field which has been the preferred way since aa30f47cf666 ("kobject: Add
support for default attribute groups to kobj_type") so that we can soon
get rid of the obsolete default_attrs field.

Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/parisc/pdc_stable.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
index e090978518f1..9513c39719d1 100644
--- a/drivers/parisc/pdc_stable.c
+++ b/drivers/parisc/pdc_stable.c
@@ -482,11 +482,12 @@ static struct attribute *paths_subsys_attrs[] = {
 	&paths_attr_layer.attr,
 	NULL,
 };
+ATTRIBUTE_GROUPS(paths_subsys);
 
 /* Specific kobject type for our PDC paths */
 static struct kobj_type ktype_pdcspath = {
 	.sysfs_ops = &pdcspath_attr_ops,
-	.default_attrs = paths_subsys_attrs,
+	.default_groups = paths_subsys_groups,
 };
 
 /* We hard define the 4 types of path we expect to find */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] parisc: pdc_stable: use default_groups in kobj_type
  2022-01-06  9:51 [PATCH] parisc: pdc_stable: use default_groups in kobj_type Greg Kroah-Hartman
@ 2022-01-06 14:17 ` Helge Deller
  0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2022-01-06 14:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel; +Cc: James E.J. Bottomley, linux-parisc

On 1/6/22 10:51, Greg Kroah-Hartman wrote:
> There are currently 2 ways to create a set of sysfs files for a
> kobj_type, through the default_attrs field, and the default_groups
> field.  Move the parisc pdc_stable sysfs code to use default_groups
> field which has been the preferred way since aa30f47cf666 ("kobject: Add
> support for default attribute groups to kobj_type") so that we can soon
> get rid of the obsolete default_attrs field.
>
> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
> Cc: Helge Deller <deller@gmx.de>
> Cc: linux-parisc@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Applied.

Thanks!
Helge

> ---
>  drivers/parisc/pdc_stable.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
> index e090978518f1..9513c39719d1 100644
> --- a/drivers/parisc/pdc_stable.c
> +++ b/drivers/parisc/pdc_stable.c
> @@ -482,11 +482,12 @@ static struct attribute *paths_subsys_attrs[] = {
>  	&paths_attr_layer.attr,
>  	NULL,
>  };
> +ATTRIBUTE_GROUPS(paths_subsys);
>
>  /* Specific kobject type for our PDC paths */
>  static struct kobj_type ktype_pdcspath = {
>  	.sysfs_ops = &pdcspath_attr_ops,
> -	.default_attrs = paths_subsys_attrs,
> +	.default_groups = paths_subsys_groups,
>  };
>
>  /* We hard define the 4 types of path we expect to find */
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-06 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06  9:51 [PATCH] parisc: pdc_stable: use default_groups in kobj_type Greg Kroah-Hartman
2022-01-06 14:17 ` Helge Deller

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).