From: Miguel Ojeda Sandonis <maxextreme@gmail.com>
To: torvalds@osdl.org
Cc: greg@kroah.com, alan@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org
Subject: [PATCH 0/1 Re] drivers: add const to class_create
Date: Wed, 13 Sep 2006 15:33:29 +0200 [thread overview]
Message-ID: <20060913153329.7737183c.maxextreme@gmail.com> (raw)
Trivial patch.
Adds const to class_create second parameter, because:
struct class {
const char * name;
/*...*/
}
Signed-off-by: Miguel Ojeda Sandonis <maxextreme@gmail.com>
---
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,
reply other threads:[~2006-09-15 1:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060913153329.7737183c.maxextreme@gmail.com \
--to=maxextreme@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox