mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
sysfs: constify sysfs create/remove files harder
Let the passed in array be const (and thus placed in rodata) instead of a mutable array of const pointers. Cc: Greg Kroah-Hartman <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Reviewed-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
parent
46592892e1
commit
9ee4685c9a
2 changed files with 6 additions and 6 deletions
|
|
@ -334,7 +334,7 @@ int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(sysfs_create_file_ns);
|
||||
|
||||
int sysfs_create_files(struct kobject *kobj, const struct attribute **ptr)
|
||||
int sysfs_create_files(struct kobject *kobj, const struct attribute * const *ptr)
|
||||
{
|
||||
int err = 0;
|
||||
int i;
|
||||
|
|
@ -493,7 +493,7 @@ bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void sysfs_remove_files(struct kobject *kobj, const struct attribute **ptr)
|
||||
void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *ptr)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; ptr[i]; i++)
|
||||
|
|
|
|||
Loading…
Reference in a new issue