[openwrt/openwrt] Revert "ramips: gpio: fix compilation if CONFIG_GPIO_SYSFS=n"

LEDE Commits lede-commits at lists.infradead.org
Tue Mar 13 05:10:28 PDT 2018


blogic pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/d57ca53ff9d0f6236ab4d5fb7d5585da6596aef9

commit d57ca53ff9d0f6236ab4d5fb7d5585da6596aef9
Author: John Crispin <john at phrozen.org>
AuthorDate: Tue Mar 13 13:09:59 2018 +0100

    Revert "ramips: gpio: fix compilation if CONFIG_GPIO_SYSFS=n"
    
    This reverts commit cff2dedebc665dc1d3d64d850afd0124c6d35eaa.
    
    This patch causes build issues
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 .../patches-4.9/0024-GPIO-add-named-gpio-exports.patch    | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/target/linux/ramips/patches-4.9/0024-GPIO-add-named-gpio-exports.patch b/target/linux/ramips/patches-4.9/0024-GPIO-add-named-gpio-exports.patch
index 136c102..3434864 100644
--- a/target/linux/ramips/patches-4.9/0024-GPIO-add-named-gpio-exports.patch
+++ b/target/linux/ramips/patches-4.9/0024-GPIO-add-named-gpio-exports.patch
@@ -127,10 +127,11 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  static int match_export(struct device *dev, const void *desc)
 --- a/include/asm-generic/gpio.h
 +++ b/include/asm-generic/gpio.h
-@@ -126,6 +126,11 @@ static inline int gpio_export(unsigned g
+@@ -126,6 +126,12 @@ static inline int gpio_export(unsigned g
  	return gpiod_export(gpio_to_desc(gpio), direction_may_change);
  }
  
++int __gpiod_export(struct gpio_desc *desc, bool direction_may_change, const char *name);
 +static inline int gpio_export_with_name(unsigned gpio, bool direction_may_change, const char *name)
 +{
 +	return __gpiod_export(gpio_to_desc(gpio), direction_may_change, name);
@@ -141,13 +142,21 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  {
 --- a/include/linux/gpio/consumer.h
 +++ b/include/linux/gpio/consumer.h
+@@ -427,6 +427,7 @@ static inline struct gpio_desc *devm_get
+ 
+ #if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS)
+ 
++int _gpiod_export(struct gpio_desc *desc, bool direction_may_change, const char *name);
+ int gpiod_export(struct gpio_desc *desc, bool direction_may_change);
+ int gpiod_export_link(struct device *dev, const char *name,
+ 		      struct gpio_desc *desc);
 @@ -434,6 +435,13 @@ void gpiod_unexport(struct gpio_desc *de
  
  #else  /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */
  
 +static inline int _gpiod_export(struct gpio_desc *desc,
-+				 bool direction_may_change,
-+				 const char *name)
++			       bool direction_may_change,
++			       const char *name)
 +{
 +	return -ENOSYS;
 +}



More information about the lede-commits mailing list