[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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
commit 419cab3fc69588ebe35b845cc3a584ae172463de
tree 7886076bcc4970005cbd39c886eb414bb61242a4
parent f3b4f3c6dec04c6c8261fe22645f07b39976595a
author Dmitry Torokhov <[email protected]> Tue, 26 Apr 2005 02:32:54 -0500
committer Greg Kroah-Hartman <[email protected]> Mon, 20 Jun 2005 15:15:01 -0700
drivers/base/class.c | 2 +-
drivers/base/core.c | 2 +-
include/linux/kobject.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/base/class.c b/drivers/base/class.c
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -262,7 +262,7 @@ static int class_hotplug_filter(struct k
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);
diff --git a/drivers/base/core.c b/drivers/base/core.c
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -102,7 +102,7 @@ static int dev_hotplug_filter(struct kse
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);
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -94,7 +94,7 @@ struct kobj_type {
*/
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);
};
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]