diff options
author | Phil Carmody <ext-phil.2.carmody@nokia.com> | 2009-12-18 13:34:20 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-23 19:23:43 (GMT) |
commit | 66ecb92be9eb579df93add22d19843e7869f168e (patch) | |
tree | 60a8c4ecfd1ccb0743a137ecfbd972888dbd34ce /drivers/base | |
parent | 26579ab70aa0e0ea434e6e100279d2f67c094431 (diff) | |
download | linux-66ecb92be9eb579df93add22d19843e7869f168e.tar.xz |
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 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 2fd9e61..83afc8b 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -472,7 +472,8 @@ void device_remove_file(struct device *dev, * @dev: device. * @attr: device binary attribute descriptor. */ -int device_create_bin_file(struct device *dev, struct bin_attribute *attr) +int device_create_bin_file(struct device *dev, + const struct bin_attribute *attr) { int error = -EINVAL; if (dev) @@ -486,7 +487,8 @@ EXPORT_SYMBOL_GPL(device_create_bin_file); * @dev: device. * @attr: device binary attribute descriptor. */ -void device_remove_bin_file(struct device *dev, struct bin_attribute *attr) +void device_remove_bin_file(struct device *dev, + const struct bin_attribute *attr) { if (dev) sysfs_remove_bin_file(&dev->kobj, attr); |