X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fkobject.c;h=3590f022a609cf7828c259b9485503fd3cda9683;hb=9c2face68782d5b7a322df6aade0512b47d29f10;hp=a7e3bf4d3c70317273b63003dc18f714a546ac36;hpb=5c27d0f11e679e6e5b6b2047b8658409699d4a67;p=linux-2.6-omap-h63xx.git diff --git a/lib/kobject.c b/lib/kobject.c index a7e3bf4d3c7..3590f022a60 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -234,13 +234,13 @@ int kobject_register(struct kobject * kobj) /** - * kobject_set_name - Set the name of an object - * @kobj: object. - * @fmt: format string used to build the name + * kobject_set_name - Set the name of a kobject + * @kobj: kobject to name + * @fmt: format string used to build the name * - * If strlen(name) >= KOBJ_NAME_LEN, then use a dynamically allocated - * string that @kobj->k_name points to. Otherwise, use the static - * @kobj->name array. + * This sets the name of the kobject. If you have already added the + * kobject to the system, you must call kobject_rename() in order to + * change the name of the kobject. */ int kobject_set_name(struct kobject * kobj, const char * fmt, ...) { @@ -313,8 +313,8 @@ int kobject_rename(struct kobject * kobj, const char *new_name) struct kobject *temp_kobj; temp_kobj = kset_find_obj(kobj->kset, new_name); if (temp_kobj) { - printk(KERN_WARNING "kobject '%s' can not be renamed " - "to '%s' as '%s' is already in existance.\n", + printk(KERN_WARNING "kobject '%s' cannot be renamed " + "to '%s' as '%s' is already in existence.\n", kobject_name(kobj), new_name, new_name); kobject_put(temp_kobj); return -EINVAL;