mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 06:21:31 +00:00
driver core: Suppress sysfs warnings for device_rename().
driver core: Suppress sysfs warnings for device_rename(). Renaming network devices to an already existing name is not something we want sysfs to print a scary warning for, since the callers can deal with this correctly. So let's introduce sysfs_create_link_nowarn() which gets rid of the common warning. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
0ad1d6f37c
commit
36ce6dad6e
5 changed files with 94 additions and 24 deletions
|
@ -101,6 +101,9 @@ void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr);
|
|||
|
||||
int __must_check sysfs_create_link(struct kobject *kobj, struct kobject *target,
|
||||
const char *name);
|
||||
int __must_check sysfs_create_link_nowarn(struct kobject *kobj,
|
||||
struct kobject *target,
|
||||
const char *name);
|
||||
void sysfs_remove_link(struct kobject *kobj, const char *name);
|
||||
|
||||
int __must_check sysfs_create_group(struct kobject *kobj,
|
||||
|
@ -180,6 +183,13 @@ static inline int sysfs_create_link(struct kobject *kobj,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int sysfs_create_link_nowarn(struct kobject *kobj,
|
||||
struct kobject *target,
|
||||
const char *name)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void sysfs_remove_link(struct kobject *kobj, const char *name)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue