From 27cc123ff1c783d7483062b1661f656f16a3271b Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Tue, 26 Apr 2005 02:32:00 -0500 Subject: [PATCH] --- yaml --- r: 2316 b: refs/heads/master c: f3b4f3c6dec04c6c8261fe22645f07b39976595a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/kobject.h | 6 +++--- trunk/lib/kobject.c | 2 +- trunk/lib/kobject_uevent.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 7c691e5d2f2e..30b8b3fb896a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e3a15db2415579d5136b9ba9b52fe27c66da8780 +refs/heads/master: f3b4f3c6dec04c6c8261fe22645f07b39976595a diff --git a/trunk/include/linux/kobject.h b/trunk/include/linux/kobject.h index 765d660d3bea..76dc67245c0c 100644 --- a/trunk/include/linux/kobject.h +++ b/trunk/include/linux/kobject.h @@ -33,7 +33,7 @@ extern u64 hotplug_seqnum; struct kobject { - char * k_name; + const char * k_name; char name[KOBJ_NAME_LEN]; struct kref kref; struct list_head entry; @@ -46,7 +46,7 @@ struct kobject { extern int kobject_set_name(struct kobject *, const char *, ...) __attribute__((format(printf,2,3))); -static inline char * kobject_name(struct kobject * kobj) +static inline const char * kobject_name(const struct kobject * kobj) { return kobj->k_name; } @@ -57,7 +57,7 @@ extern void kobject_cleanup(struct kobject *); extern int kobject_add(struct kobject *); extern void kobject_del(struct kobject *); -extern int kobject_rename(struct kobject *, char *new_name); +extern int kobject_rename(struct kobject *, const char *new_name); extern int kobject_register(struct kobject *); extern void kobject_unregister(struct kobject *); diff --git a/trunk/lib/kobject.c b/trunk/lib/kobject.c index 94048826624c..dd0917dd9fa9 100644 --- a/trunk/lib/kobject.c +++ b/trunk/lib/kobject.c @@ -279,7 +279,7 @@ EXPORT_SYMBOL(kobject_set_name); * @new_name: object's new name */ -int kobject_rename(struct kobject * kobj, char *new_name) +int kobject_rename(struct kobject * kobj, const char *new_name) { int error = 0; diff --git a/trunk/lib/kobject_uevent.c b/trunk/lib/kobject_uevent.c index 1ede5aa33376..8e49d21057e4 100644 --- a/trunk/lib/kobject_uevent.c +++ b/trunk/lib/kobject_uevent.c @@ -197,7 +197,7 @@ void kobject_hotplug(struct kobject *kobj, enum kobject_action action) int i = 0; int retval; char *kobj_path = NULL; - char *name = NULL; + const char *name = NULL; char *action_string; u64 seq; struct kobject *top_kobj = kobj; @@ -249,7 +249,7 @@ void kobject_hotplug(struct kobject *kobj, enum kobject_action action) name = kobject_name(&kset->kobj); argv [0] = hotplug_path; - argv [1] = name; + argv [1] = (char *)name; /* won't be changed but 'const' has to go */ argv [2] = NULL; /* minimal command environment */