Commit 6937e8f8c0135f2325194c372ada6dc655499992

Authored by Johannes Berg
Committed by Greg Kroah-Hartman
1 parent 6fd69dc578

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>

Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -1599,7 +1599,7 @@
1599 1599 * on the same device to ensure that new_name is valid and
1600 1600 * won't conflict with other devices.
1601 1601 */
1602   -int device_rename(struct device *dev, char *new_name)
  1602 +int device_rename(struct device *dev, const char *new_name)
1603 1603 {
1604 1604 char *old_class_name = NULL;
1605 1605 char *new_class_name = NULL;
include/linux/device.h
... ... @@ -552,7 +552,7 @@
552 552 int (*fn)(struct device *dev, void *data));
553 553 extern struct device *device_find_child(struct device *dev, void *data,
554 554 int (*match)(struct device *dev, void *data));
555   -extern int device_rename(struct device *dev, char *new_name);
  555 +extern int device_rename(struct device *dev, const char *new_name);
556 556 extern int device_move(struct device *dev, struct device *new_parent,
557 557 enum dpm_order dpm_order);
558 558 extern const char *device_get_devnode(struct device *dev,