diff options
author | Trent Piepho <tpiepho@freescale.com> | 2008-09-25 19:45:13 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-16 12:24:51 -0400 |
commit | 8c0e3998f5b71e68fe6b6e489a92e052715e563c (patch) | |
tree | df57b05090964df2138c8b59d3796c8509e92ed5 /include | |
parent | d8bf254089a6c31d7d01a4d1d2f1861662900855 (diff) |
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: Trent Piepho <tpiepho@freescale.com>
CC: Neil Brown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sysfs.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index d8e0230f1e68..b330e289d71f 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -119,7 +119,7 @@ int sysfs_add_file_to_group(struct kobject *kobj, | |||
119 | void sysfs_remove_file_from_group(struct kobject *kobj, | 119 | void sysfs_remove_file_from_group(struct kobject *kobj, |
120 | const struct attribute *attr, const char *group); | 120 | const struct attribute *attr, const char *group); |
121 | 121 | ||
122 | void sysfs_notify(struct kobject *kobj, char *dir, char *attr); | 122 | void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr); |
123 | void sysfs_notify_dirent(struct sysfs_dirent *sd); | 123 | void sysfs_notify_dirent(struct sysfs_dirent *sd); |
124 | struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd, | 124 | struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd, |
125 | const unsigned char *name); | 125 | const unsigned char *name); |
@@ -229,7 +229,8 @@ static inline void sysfs_remove_file_from_group(struct kobject *kobj, | |||
229 | { | 229 | { |
230 | } | 230 | } |
231 | 231 | ||
232 | static inline void sysfs_notify(struct kobject *kobj, char *dir, char *attr) | 232 | static inline void sysfs_notify(struct kobject *kobj, const char *dir, |
233 | const char *attr) | ||
233 | { | 234 | { |
234 | } | 235 | } |
235 | static inline void sysfs_notify_dirent(struct sysfs_dirent *sd) | 236 | static inline void sysfs_notify_dirent(struct sysfs_dirent *sd) |