From: Linus Walleij <linus.ml.walleij@gmail.com>
To: gregkh@suse.de, linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.arm.linux.org.uk
Subject: [PATCH] Const-correct platform getbyname functions
Date: Mon, 27 Apr 2009 02:38:16 +0200 [thread overview]
Message-ID: <63386a3d0904261738y1a2ac4e6of42fcb3cd6b5707b@mail.gmail.com> (raw)
This converts resource and IRQ getbyname functions for the platform
bus to use const char *, I ran into compiler moanings when I tried
using a const char * for looking up a certain resource.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
---
drivers/base/platform.c | 4 ++--
include/linux/platform_device.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index b5b6c97..09d23f8 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -69,7 +69,8 @@ EXPORT_SYMBOL_GPL(platform_get_irq);
* @name: resource name
*/
struct resource *platform_get_resource_byname(struct platform_device *dev,
- unsigned int type, char *name)
+ unsigned int type,
+ const char *name)
{
int i;
@@ -88,7 +88,7 @@ EXPORT_SYMBOL_GPL(platform_get_resource_byname);
* @dev: platform device
* @name: IRQ name
*/
-int platform_get_irq_byname(struct platform_device *dev, char *name)
+int platform_get_irq_byname(struct platform_device *dev, const char *name)
{
struct resource *r = platform_get_resource_byname(dev, IORESOURCE_IRQ,
name);
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index 72736fd..c36f33f 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -37,8 +37,8 @@ extern struct device platform_bus;
extern struct resource *platform_get_resource(struct platform_device
*, unsigned int, unsigned int);
extern int platform_get_irq(struct platform_device *, unsigned int);
-extern struct resource *platform_get_resource_byname(struct
platform_device *, unsigned int, char *);
-extern int platform_get_irq_byname(struct platform_device *, char *);
+extern struct resource *platform_get_resource_byname(struct
platform_device *, unsigned int, const char *);
+extern int platform_get_irq_byname(struct platform_device *, const char *);
extern int platform_add_devices(struct platform_device **, int);
extern struct platform_device *platform_device_register_simple(const
char *, int id,
--
1.6.0.6
reply other threads:[~2009-04-27 0:38 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=63386a3d0904261738y1a2ac4e6of42fcb3cd6b5707b@mail.gmail.com \
--to=linus.ml.walleij@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®