From dtor_core@ameritech.net Tue Apr 26 00:45:52 2005 From: Dmitry Torokhov To: linux-kernel@vger.kernel.org Subject: [PATCH 4/5] kset_hotplug_ops->name shoudl return const char * Date: Tue, 26 Apr 2005 02:32:54 -0500 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 Signed-off-by: Greg Kroah-Hartman --- drivers/base/class.c | 2 +- drivers/base/core.c | 2 +- include/linux/kobject.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) --- gregkh-2.6.orig/drivers/base/class.c 2005-05-09 09:06:56.000000000 -0700 +++ gregkh-2.6/drivers/base/class.c 2005-05-09 09:15:59.000000000 -0700 @@ -262,7 +262,7 @@ 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); --- gregkh-2.6.orig/include/linux/kobject.h 2005-05-09 09:15:56.000000000 -0700 +++ gregkh-2.6/include/linux/kobject.h 2005-05-09 09:15:59.000000000 -0700 @@ -94,7 +94,7 @@ */ struct kset_hotplug_ops { 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 num_envp, char *buffer, int buffer_size); }; --- gregkh-2.6.orig/drivers/base/core.c 2005-05-09 09:06:56.000000000 -0700 +++ gregkh-2.6/drivers/base/core.c 2005-05-09 09:15:59.000000000 -0700 @@ -105,7 +105,7 @@ 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);