[PATCH 0/1 Re] drivers: add const to class_create

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Trivial patch.

Adds const to class_create second parameter, because:

struct class {
	const char * name;

	/*...*/
}

Signed-off-by: Miguel Ojeda Sandonis <[email protected]>
---
diff -uprN -X linux-2.6.18-rc7/Documentation/dontdiff linux-2.6.18-rc7-vanilla/drivers/base/class.c linux-2.6.18-rc7/drivers/base/class.c
--- linux-2.6.18-rc7-vanilla/drivers/base/class.c	2006-09-13 14:01:47.000000000 +0200
+++ linux-2.6.18-rc7/drivers/base/class.c	2006-09-13 14:13:16.000000000 +0200
@@ -197,7 +197,7 @@ static int class_device_create_uevent(st
  * 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;
diff -uprN -X linux-2.6.18-rc7/Documentation/dontdiff linux-2.6.18-rc7-vanilla/include/linux/device.h linux-2.6.18-rc7/include/linux/device.h
--- linux-2.6.18-rc7-vanilla/include/linux/device.h	2006-09-13 14:02:12.000000000 +0200
+++ linux-2.6.18-rc7/include/linux/device.h	2006-09-13 14:12:45.000000000 +0200
@@ -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,
-
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]
  Powered by Linux