Commit 419cab3fc69588ebe35b845cc3a584ae172463de
Committed by
Greg Kroah-Hartman
1 parent
f3b4f3c6de
Exists in
master
and in
7 other branches
[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: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 3 changed files with 3 additions and 3 deletions Side-by-side Diff
drivers/base/class.c
... | ... | @@ -262,7 +262,7 @@ |
262 | 262 | return 0; |
263 | 263 | } |
264 | 264 | |
265 | -static char *class_hotplug_name(struct kset *kset, struct kobject *kobj) | |
265 | +static const char *class_hotplug_name(struct kset *kset, struct kobject *kobj) | |
266 | 266 | { |
267 | 267 | struct class_device *class_dev = to_class_dev(kobj); |
268 | 268 |
drivers/base/core.c
include/linux/kobject.h
... | ... | @@ -94,7 +94,7 @@ |
94 | 94 | */ |
95 | 95 | struct kset_hotplug_ops { |
96 | 96 | int (*filter)(struct kset *kset, struct kobject *kobj); |
97 | - char *(*name)(struct kset *kset, struct kobject *kobj); | |
97 | + const char *(*name)(struct kset *kset, struct kobject *kobj); | |
98 | 98 | int (*hotplug)(struct kset *kset, struct kobject *kobj, char **envp, |
99 | 99 | int num_envp, char *buffer, int buffer_size); |
100 | 100 | }; |