aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.ml.walleij@gmail.com>2009-04-26 20:38:16 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:30:24 -0400
commitc0afe7ba5e71d8ab66bc42f90b3e237581d3c509 (patch)
treea4fb6323ac6e21df4ea1264bee306c073479648f
parent309b7d60a345f402bec3cf9caadb53de4028e2aa (diff)
driver core: Const-correct platform getbyname functions
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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/base/platform.c5
-rw-r--r--include/linux/platform_device.h4
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index ead3f64c41d0..59df6290951b 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -69,7 +69,8 @@ EXPORT_SYMBOL_GPL(platform_get_irq);
69 * @name: resource name 69 * @name: resource name
70 */ 70 */
71struct resource *platform_get_resource_byname(struct platform_device *dev, 71struct resource *platform_get_resource_byname(struct platform_device *dev,
72 unsigned int type, char *name) 72 unsigned int type,
73 const char *name)
73{ 74{
74 int i; 75 int i;
75 76
@@ -88,7 +89,7 @@ EXPORT_SYMBOL_GPL(platform_get_resource_byname);
88 * @dev: platform device 89 * @dev: platform device
89 * @name: IRQ name 90 * @name: IRQ name
90 */ 91 */
91int platform_get_irq_byname(struct platform_device *dev, char *name) 92int platform_get_irq_byname(struct platform_device *dev, const char *name)
92{ 93{
93 struct resource *r = platform_get_resource_byname(dev, IORESOURCE_IRQ, 94 struct resource *r = platform_get_resource_byname(dev, IORESOURCE_IRQ,
94 name); 95 name);
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index b67bb5d7b221..8dc5123b6305 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -36,8 +36,8 @@ extern struct device platform_bus;
36 36
37extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int); 37extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int);
38extern int platform_get_irq(struct platform_device *, unsigned int); 38extern int platform_get_irq(struct platform_device *, unsigned int);
39extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, char *); 39extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, const char *);
40extern int platform_get_irq_byname(struct platform_device *, char *); 40extern int platform_get_irq_byname(struct platform_device *, const char *);
41extern int platform_add_devices(struct platform_device **, int); 41extern int platform_add_devices(struct platform_device **, int);
42 42
43extern struct platform_device *platform_device_register_simple(const char *, int id, 43extern struct platform_device *platform_device_register_simple(const char *, int id,