Commit 419cab3f authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Greg Kroah-Hartman

[PATCH] kset_hotplug_ops->name shoudl return const char *

kobject: change name() method in kset_hotplug_ops return const char *
	 since users shoudl not try to modify returned data.
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f3b4f3c6
...@@ -262,7 +262,7 @@ static int class_hotplug_filter(struct kset *kset, struct kobject *kobj) ...@@ -262,7 +262,7 @@ static int class_hotplug_filter(struct kset *kset, struct kobject *kobj)
return 0; return 0;
} }
static char *class_hotplug_name(struct kset *kset, struct kobject *kobj) static const char *class_hotplug_name(struct kset *kset, struct kobject *kobj)
{ {
struct class_device *class_dev = to_class_dev(kobj); struct class_device *class_dev = to_class_dev(kobj);
......
...@@ -102,7 +102,7 @@ static int dev_hotplug_filter(struct kset *kset, struct kobject *kobj) ...@@ -102,7 +102,7 @@ static int dev_hotplug_filter(struct kset *kset, struct kobject *kobj)
return 0; return 0;
} }
static char *dev_hotplug_name(struct kset *kset, struct kobject *kobj) static const char *dev_hotplug_name(struct kset *kset, struct kobject *kobj)
{ {
struct device *dev = to_dev(kobj); struct device *dev = to_dev(kobj);
......
...@@ -94,7 +94,7 @@ struct kobj_type { ...@@ -94,7 +94,7 @@ struct kobj_type {
*/ */
struct kset_hotplug_ops { struct kset_hotplug_ops {
int (*filter)(struct kset *kset, struct kobject *kobj); int (*filter)(struct kset *kset, struct kobject *kobj);
char *(*name)(struct kset *kset, struct kobject *kobj); const char *(*name)(struct kset *kset, struct kobject *kobj);
int (*hotplug)(struct kset *kset, struct kobject *kobj, char **envp, int (*hotplug)(struct kset *kset, struct kobject *kobj, char **envp,
int num_envp, char *buffer, int buffer_size); int num_envp, char *buffer, int buffer_size);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment