diff --git a/drivers/base/core.c b/drivers/base/core.c index f8e72724dd4b78c0d7048f552a5be29bb189956b..d1b2c9adc2718ebcf8979d19b0c065803020836e 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 0ca24e93304fc1dcc3f410950dbba5562337563a..516fecacf27b424f29b95c9ee4921b7fd5805dc5 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,