aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2011-05-25 19:20:31 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-05-27 19:56:45 -0400
commit7c295975a85b049385dfe0d5ee0d4d543619fbdc (patch)
tree447683c4ddaf6e4380ad8f5f5dd20d4576f7428e /include
parent3474cb3cc0140f9cf6ca56983f8180b4b4c5c36a (diff)
gpio: make gpio_{request,free}_array gpio array parameter const
gpio_{request,free}_array should not (and do not) modify the passed gpio array, so make the parameter const. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Eric Miao <eric.y.miao@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/gpio.h4
-rw-r--r--include/linux/gpio.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index a98b52cb970b..fcdcb5d5c995 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -193,8 +193,8 @@ struct gpio {
193}; 193};
194 194
195extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label); 195extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
196extern int gpio_request_array(struct gpio *array, size_t num); 196extern int gpio_request_array(const struct gpio *array, size_t num);
197extern void gpio_free_array(struct gpio *array, size_t num); 197extern void gpio_free_array(const struct gpio *array, size_t num);
198 198
199#ifdef CONFIG_GPIO_SYSFS 199#ifdef CONFIG_GPIO_SYSFS
200 200
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 0f8265f8e8c3..32d47e710661 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -41,7 +41,7 @@ static inline int gpio_request_one(unsigned gpio,
41 return -ENOSYS; 41 return -ENOSYS;
42} 42}
43 43
44static inline int gpio_request_array(struct gpio *array, size_t num) 44static inline int gpio_request_array(const struct gpio *array, size_t num)
45{ 45{
46 return -ENOSYS; 46 return -ENOSYS;
47} 47}
@@ -54,7 +54,7 @@ static inline void gpio_free(unsigned gpio)
54 WARN_ON(1); 54 WARN_ON(1);
55} 55}
56 56
57static inline void gpio_free_array(struct gpio *array, size_t num) 57static inline void gpio_free_array(const struct gpio *array, size_t num)
58{ 58{
59 might_sleep(); 59 might_sleep();
60 60