aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
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 /drivers/gpio
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 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 137a8ca67822..a971e3d043ba 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1296,7 +1296,7 @@ EXPORT_SYMBOL_GPL(gpio_request_one);
1296 * @array: array of the 'struct gpio' 1296 * @array: array of the 'struct gpio'
1297 * @num: how many GPIOs in the array 1297 * @num: how many GPIOs in the array
1298 */ 1298 */
1299int gpio_request_array(struct gpio *array, size_t num) 1299int gpio_request_array(const struct gpio *array, size_t num)
1300{ 1300{
1301 int i, err; 1301 int i, err;
1302 1302
@@ -1319,7 +1319,7 @@ EXPORT_SYMBOL_GPL(gpio_request_array);
1319 * @array: array of the 'struct gpio' 1319 * @array: array of the 'struct gpio'
1320 * @num: how many GPIOs in the array 1320 * @num: how many GPIOs in the array
1321 */ 1321 */
1322void gpio_free_array(struct gpio *array, size_t num) 1322void gpio_free_array(const struct gpio *array, size_t num)
1323{ 1323{
1324 while (num--) 1324 while (num--)
1325 gpio_free((array++)->gpio); 1325 gpio_free((array++)->gpio);