diff options
author | Phil Carmody <ext-phil.2.carmody@nokia.com> | 2009-12-18 15:34:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-23 11:23:43 -0800 |
commit | 66ecb92be9eb579df93add22d19843e7869f168e (patch) | |
tree | 60a8c4ecfd1ccb0743a137ecfbd972888dbd34ce /include/linux/sysfs.h | |
parent | 26579ab70aa0e0ea434e6e100279d2f67c094431 (diff) | |
download | talos-op-linux-66ecb92be9eb579df93add22d19843e7869f168e.tar.gz talos-op-linux-66ecb92be9eb579df93add22d19843e7869f168e.zip |
Driver core: bin_attribute parameters can often be const*
Many struct bin_attribute descriptors are purely read-only
structures, and there's no need to change them. Therefore
make the promise not to, which will let those descriptors
be put in a ro section.
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r-- | include/linux/sysfs.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 9d68fed50f11..cfa83083a2d4 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -99,8 +99,9 @@ int __must_check sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr); int __must_check sysfs_create_bin_file(struct kobject *kobj, - struct bin_attribute *attr); -void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr); + const struct bin_attribute *attr); +void sysfs_remove_bin_file(struct kobject *kobj, + const struct bin_attribute *attr); int __must_check sysfs_create_link(struct kobject *kobj, struct kobject *target, const char *name); @@ -175,13 +176,13 @@ static inline void sysfs_remove_file(struct kobject *kobj, } static inline int sysfs_create_bin_file(struct kobject *kobj, - struct bin_attribute *attr) + const struct bin_attribute *attr) { return 0; } static inline void sysfs_remove_bin_file(struct kobject *kobj, - struct bin_attribute *attr) + const struct bin_attribute *attr) { } |