]> err.no Git - linux-2.6/commitdiff
Driver core: add const to class_create
authorMiguel Ojeda Sandonis <maxextreme@gmail.com>
Wed, 13 Sep 2006 13:34:05 +0000 (15:34 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 26 Sep 2006 04:08:36 +0000 (21:08 -0700)
Adds const to class_create second parameter, because:

struct class {
const char * name;

/*...*/
}

Signed-off-by: Miguel Ojeda Sandonis <maxextreme@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/class.c
include/linux/device.h

index 75057aaab809776d7c800969d179470a106ac473..e078bc21d52e9fcfd012cbb9b4fdc2cb6a7f3b89 100644 (file)
@@ -197,7 +197,7 @@ static int class_device_create_uevent(struct class_device *class_dev,
  * Note, the pointer created here is to be destroyed when finished by
  * making a call to class_destroy().
  */
-struct class *class_create(struct module *owner, char *name)
+struct class *class_create(struct module *owner, const char *name)
 {
        struct class *cls;
        int retval;
index 8d92013f9ce15ec31e36acbfddece5ddb853d6bb..8a648cd94fa958c5a9c6fcb07036fc5617b9ad18 100644 (file)
@@ -271,7 +271,7 @@ struct class_interface {
 extern int class_interface_register(struct class_interface *);
 extern void class_interface_unregister(struct class_interface *);
 
-extern struct class *class_create(struct module *owner, char *name);
+extern struct class *class_create(struct module *owner, const char *name);
 extern void class_destroy(struct class *cls);
 extern struct class_device *class_device_create(struct class *cls,
                                                struct class_device *parent,