summaryrefslogtreecommitdiff
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorPhil Carmody <ext-phil.2.carmody@nokia.com>2009-12-18 15:34:19 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-23 11:23:43 -0800
commit26579ab70aa0e0ea434e6e100279d2f67c094431 (patch)
tree1c9dfd6ed6209ecee088e3e6b600ebd7fba24acc /include/linux/device.h
parent8e9b9362266dd16255473c080d846b13e27247bf (diff)
downloadlinux-3.10-26579ab70aa0e0ea434e6e100279d2f67c094431.tar.gz
linux-3.10-26579ab70aa0e0ea434e6e100279d2f67c094431.tar.bz2
linux-3.10-26579ab70aa0e0ea434e6e100279d2f67c094431.zip
Driver core: device_attribute parameters can often be const*
Most device_attributes are const, and are begging to be put in a ro section. However, the create and remove file interfaces were failing to propagate the const promise which the only functions they call offer. 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/device.h')
-rw-r--r--include/linux/device.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 2a73d9bcbc9..aa5b3e66a14 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -319,9 +319,9 @@ struct device_attribute {
struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
extern int __must_check device_create_file(struct device *device,
- struct device_attribute *entry);
+ const struct device_attribute *entry);
extern void device_remove_file(struct device *dev,
- struct device_attribute *attr);
+ const struct device_attribute *attr);
extern int __must_check device_create_bin_file(struct device *dev,
struct bin_attribute *attr);
extern void device_remove_bin_file(struct device *dev,