[merged] gpio-make-gpio_requestfree_array-gpio-array-parameter-const.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     gpio: make gpio_{request,free}_array gpio array parameter const
has been removed from the -mm tree.  Its filename was
     gpio-make-gpio_requestfree_array-gpio-array-parameter-const.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: gpio: make gpio_{request,free}_array gpio array parameter const
From: Lars-Peter Clausen <lars@xxxxxxxxxx>

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@xxxxxxxxxx>
Acked-by: Eric Miao <eric.y.miao@xxxxxxxxx>
Acked-by: Wolfram Sang <w.sang@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/gpio/gpiolib.c     |    4 ++--
 include/asm-generic/gpio.h |    4 ++--
 include/linux/gpio.h       |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff -puN drivers/gpio/gpiolib.c~gpio-make-gpio_requestfree_array-gpio-array-parameter-const drivers/gpio/gpiolib.c
--- a/drivers/gpio/gpiolib.c~gpio-make-gpio_requestfree_array-gpio-array-parameter-const
+++ a/drivers/gpio/gpiolib.c
@@ -1296,7 +1296,7 @@ EXPORT_SYMBOL_GPL(gpio_request_one);
  * @array:	array of the 'struct gpio'
  * @num:	how many GPIOs in the array
  */
-int gpio_request_array(struct gpio *array, size_t num)
+int gpio_request_array(const struct gpio *array, size_t num)
 {
 	int i, err;
 
@@ -1319,7 +1319,7 @@ EXPORT_SYMBOL_GPL(gpio_request_array);
  * @array:	array of the 'struct gpio'
  * @num:	how many GPIOs in the array
  */
-void gpio_free_array(struct gpio *array, size_t num)
+void gpio_free_array(const struct gpio *array, size_t num)
 {
 	while (num--)
 		gpio_free((array++)->gpio);
diff -puN include/asm-generic/gpio.h~gpio-make-gpio_requestfree_array-gpio-array-parameter-const include/asm-generic/gpio.h
--- a/include/asm-generic/gpio.h~gpio-make-gpio_requestfree_array-gpio-array-parameter-const
+++ a/include/asm-generic/gpio.h
@@ -193,8 +193,8 @@ struct gpio {
 };
 
 extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
-extern int gpio_request_array(struct gpio *array, size_t num);
-extern void gpio_free_array(struct gpio *array, size_t num);
+extern int gpio_request_array(const struct gpio *array, size_t num);
+extern void gpio_free_array(const struct gpio *array, size_t num);
 
 #ifdef CONFIG_GPIO_SYSFS
 
diff -puN include/linux/gpio.h~gpio-make-gpio_requestfree_array-gpio-array-parameter-const include/linux/gpio.h
--- a/include/linux/gpio.h~gpio-make-gpio_requestfree_array-gpio-array-parameter-const
+++ a/include/linux/gpio.h
@@ -41,7 +41,7 @@ static inline int gpio_request_one(unsig
 	return -ENOSYS;
 }
 
-static inline int gpio_request_array(struct gpio *array, size_t num)
+static inline int gpio_request_array(const struct gpio *array, size_t num)
 {
 	return -ENOSYS;
 }
@@ -54,7 +54,7 @@ static inline void gpio_free(unsigned gp
 	WARN_ON(1);
 }
 
-static inline void gpio_free_array(struct gpio *array, size_t num)
+static inline void gpio_free_array(const struct gpio *array, size_t num)
 {
 	might_sleep();
 
_

Patches currently in -mm which might be from lars@xxxxxxxxxx are


--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux