aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorPhil Carmody <ext-phil.2.carmody@nokia.com>2009-12-18 08:34:20 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-23 14:23:43 -0500
commit66ecb92be9eb579df93add22d19843e7869f168e (patch)
tree60a8c4ecfd1ccb0743a137ecfbd972888dbd34ce /drivers/base
parent26579ab70aa0e0ea434e6e100279d2f67c094431 (diff)
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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 2fd9e611f8a6..83afc8b8f27b 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -472,7 +472,8 @@ void device_remove_file(struct device *dev,
472 * @dev: device. 472 * @dev: device.
473 * @attr: device binary attribute descriptor. 473 * @attr: device binary attribute descriptor.
474 */ 474 */
475int device_create_bin_file(struct device *dev, struct bin_attribute *attr) 475int device_create_bin_file(struct device *dev,
476 const struct bin_attribute *attr)
476{ 477{
477 int error = -EINVAL; 478 int error = -EINVAL;
478 if (dev) 479 if (dev)
@@ -486,7 +487,8 @@ EXPORT_SYMBOL_GPL(device_create_bin_file);
486 * @dev: device. 487 * @dev: device.
487 * @attr: device binary attribute descriptor. 488 * @attr: device binary attribute descriptor.
488 */ 489 */
489void device_remove_bin_file(struct device *dev, struct bin_attribute *attr) 490void device_remove_bin_file(struct device *dev,
491 const struct bin_attribute *attr)
490{ 492{
491 if (dev) 493 if (dev)
492 sysfs_remove_bin_file(&dev->kobj, attr); 494 sysfs_remove_bin_file(&dev->kobj, attr);