summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-08-05 17:38:18 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-05 13:53:35 -0700
commit6937e8f8c0135f2325194c372ada6dc655499992 (patch)
tree436ede36f95f1cb40d5b9bd8f6711ca26faf0045
parent6fd69dc578fa0b1bbc3aad70ae3af9a137211707 (diff)
downloadlinux-3.10-6937e8f8c0135f2325194c372ada6dc655499992.tar.gz
linux-3.10-6937e8f8c0135f2325194c372ada6dc655499992.tar.bz2
linux-3.10-6937e8f8c0135f2325194c372ada6dc655499992.zip
driver core: device_rename's new_name can be const
The new_name argument to device_rename() can be const as kobject_rename's new_name argument is. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/base/core.c2
-rw-r--r--include/linux/device.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index f8e72724dd4..d1b2c9adc27 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1599,7 +1599,7 @@ EXPORT_SYMBOL_GPL(device_destroy);
* on the same device to ensure that new_name is valid and
* won't conflict with other devices.
*/
-int device_rename(struct device *dev, char *new_name)
+int device_rename(struct device *dev, const char *new_name)
{
char *old_class_name = NULL;
char *new_class_name = NULL;
diff --git a/include/linux/device.h b/include/linux/device.h
index 0ca24e93304..516fecacf27 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -552,7 +552,7 @@ extern int device_for_each_child(struct device *dev, void *data,
int (*fn)(struct device *dev, void *data));
extern struct device *device_find_child(struct device *dev, void *data,
int (*match)(struct device *dev, void *data));
-extern int device_rename(struct device *dev, char *new_name);
+extern int device_rename(struct device *dev, const char *new_name);
extern int device_move(struct device *dev, struct device *new_parent,
enum dpm_order dpm_order);
extern const char *device_get_devnode(struct device *dev,