lkml.org 
[lkml]   [2017]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] sysfs: add devm_sysfs_create_group() and friends
On Tue, Jul 18, 2017 at 12:30:58PM -0700, Dmitry Torokhov wrote:
> --- a/include/linux/sysfs.h
> +++ b/include/linux/sysfs.h
> @@ -282,6 +282,16 @@ int __compat_only_sysfs_link_entry_to_kobj(struct kobject *kobj,
> struct kobject *target_kobj,
> const char *target_name);
>
> +struct device;

Put this in device.h instead?

> +int __must_check devm_sysfs_create_group(struct device *dev,
> + const struct attribute_group *grp);
> +int __must_check devm_sysfs_create_groups(struct device *dev,
> + const struct attribute_group **groups);
> +void devm_sysfs_remove_group(struct device *dev,
> + const struct attribute_group *grp);
> +void devm_sysfs_remove_groups(struct device *dev,
> + const struct attribute_group **groups);

I have finally moved the driver core to only accept/need "groups" not a
single "group", so we should only need devm_sysfs_create_groups and
devm_sysfs_remove_groups, right?

And do we need/want the non-devm versions:
device_create_groups()
device_remove_groups()
?

And you can probably drop the 'sysfs' from the function name if you
want.

</bikeshedding> :)

thanks,

greg k-h

\
 
 \ /
  Last update: 2017-07-18 22:03    [W:0.324 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site