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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6fd69dc578
commit
6937e8f8c0
@@ -1599,7 +1599,7 @@ EXPORT_SYMBOL_GPL(device_destroy);
|
|||||||
* on the same device to ensure that new_name is valid and
|
* on the same device to ensure that new_name is valid and
|
||||||
* won't conflict with other devices.
|
* 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 *old_class_name = NULL;
|
||||||
char *new_class_name = NULL;
|
char *new_class_name = NULL;
|
||||||
|
@@ -552,7 +552,7 @@ extern int device_for_each_child(struct device *dev, void *data,
|
|||||||
int (*fn)(struct device *dev, void *data));
|
int (*fn)(struct device *dev, void *data));
|
||||||
extern struct device *device_find_child(struct device *dev, void *data,
|
extern struct device *device_find_child(struct device *dev, void *data,
|
||||||
int (*match)(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,
|
extern int device_move(struct device *dev, struct device *new_parent,
|
||||||
enum dpm_order dpm_order);
|
enum dpm_order dpm_order);
|
||||||
extern const char *device_get_devnode(struct device *dev,
|
extern const char *device_get_devnode(struct device *dev,
|
||||||
|
Reference in New Issue
Block a user