mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
sysfs: Implement sysfs_rename_link
Because of rename ordering problems we occassionally give false warnings about invalid sysfs operations. So using sysfs_rename create a sysfs_rename_link function that doesn't need strange workarounds. Cc: Benjamin Thery <benjamin.thery@bull.net> Cc: Daniel Lezcano <dlezcano@fr.ibm.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
19c38b632d
commit
7cb32942d9
2 changed files with 47 additions and 0 deletions
|
|
@ -151,6 +151,9 @@ int __must_check sysfs_create_link_nowarn(struct kobject *kobj,
|
|||
const char *name);
|
||||
void sysfs_remove_link(struct kobject *kobj, const char *name);
|
||||
|
||||
int sysfs_rename_link(struct kobject *kobj, struct kobject *target,
|
||||
const char *old_name, const char *new_name);
|
||||
|
||||
int __must_check sysfs_create_group(struct kobject *kobj,
|
||||
const struct attribute_group *grp);
|
||||
int sysfs_update_group(struct kobject *kobj,
|
||||
|
|
@ -255,6 +258,12 @@ static inline void sysfs_remove_link(struct kobject *kobj, const char *name)
|
|||
{
|
||||
}
|
||||
|
||||
static inline int sysfs_rename_link(struct kobject *k, struct kobject *t,
|
||||
const char *old_name, const char *new_name)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int sysfs_create_group(struct kobject *kobj,
|
||||
const struct attribute_group *grp)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue