mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
sysfs: constify group arrays in function arguments
Constify the groups array argument where applicable. This allows to pass constant arrays as arguments. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/17035265-8882-4101-b7a7-16b3eb94f8b5@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
15949f1530
commit
fe2511adb1
@@ -217,7 +217,7 @@ int sysfs_create_group(struct kobject *kobj,
|
||||
EXPORT_SYMBOL_GPL(sysfs_create_group);
|
||||
|
||||
static int internal_create_groups(struct kobject *kobj, int update,
|
||||
const struct attribute_group **groups)
|
||||
const struct attribute_group *const *groups)
|
||||
{
|
||||
int error = 0;
|
||||
int i;
|
||||
@@ -250,7 +250,7 @@ static int internal_create_groups(struct kobject *kobj, int update,
|
||||
* Returns 0 on success or error code from sysfs_create_group on failure.
|
||||
*/
|
||||
int sysfs_create_groups(struct kobject *kobj,
|
||||
const struct attribute_group **groups)
|
||||
const struct attribute_group *const *groups)
|
||||
{
|
||||
return internal_create_groups(kobj, 0, groups);
|
||||
}
|
||||
@@ -268,7 +268,7 @@ EXPORT_SYMBOL_GPL(sysfs_create_groups);
|
||||
* Returns 0 on success or error code from sysfs_update_group on failure.
|
||||
*/
|
||||
int sysfs_update_groups(struct kobject *kobj,
|
||||
const struct attribute_group **groups)
|
||||
const struct attribute_group *const *groups)
|
||||
{
|
||||
return internal_create_groups(kobj, 1, groups);
|
||||
}
|
||||
@@ -342,7 +342,7 @@ EXPORT_SYMBOL_GPL(sysfs_remove_group);
|
||||
* If groups is not NULL, remove the specified groups from the kobject.
|
||||
*/
|
||||
void sysfs_remove_groups(struct kobject *kobj,
|
||||
const struct attribute_group **groups)
|
||||
const struct attribute_group *const *groups)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -613,7 +613,7 @@ EXPORT_SYMBOL_GPL(sysfs_group_change_owner);
|
||||
* Returns 0 on success or error code on failure.
|
||||
*/
|
||||
int sysfs_groups_change_owner(struct kobject *kobj,
|
||||
const struct attribute_group **groups,
|
||||
const struct attribute_group *const *groups,
|
||||
kuid_t kuid, kgid_t kgid)
|
||||
{
|
||||
int error = 0, i;
|
||||
|
||||
Reference in New Issue
Block a user