提交 8c0e3998 编写于 作者: T Trent Piepho 提交者: Greg Kroah-Hartman

sysfs: Make dir and name args to sysfs_notify() const

Because they can be, and because code like this produces a warning if
they're not:

struct device_attribute dev_attr;

sysfs_notify(&kobj, NULL, dev_attr.attr.name);
Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
CC: Neil Brown <neilb@suse.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 d8bf2540
......@@ -469,7 +469,7 @@ void sysfs_notify_dirent(struct sysfs_dirent *sd)
}
EXPORT_SYMBOL_GPL(sysfs_notify_dirent);
void sysfs_notify(struct kobject *k, char *dir, char *attr)
void sysfs_notify(struct kobject *k, const char *dir, const char *attr)
{
struct sysfs_dirent *sd = k->sd;
......
......@@ -119,7 +119,7 @@ int sysfs_add_file_to_group(struct kobject *kobj,
void sysfs_remove_file_from_group(struct kobject *kobj,
const struct attribute *attr, const char *group);
void sysfs_notify(struct kobject *kobj, char *dir, char *attr);
void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr);
void sysfs_notify_dirent(struct sysfs_dirent *sd);
struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd,
const unsigned char *name);
......@@ -229,7 +229,8 @@ static inline void sysfs_remove_file_from_group(struct kobject *kobj,
{
}
static inline void sysfs_notify(struct kobject *kobj, char *dir, char *attr)
static inline void sysfs_notify(struct kobject *kobj, const char *dir,
const char *attr)
{
}
static inline void sysfs_notify_dirent(struct sysfs_dirent *sd)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册