lantiq: make patches apply
[openwrt/staging/blogic.git] / target / linux / lantiq / patches-4.19 / 0030-GPIO-add-named-gpio-exports.patch
index fe4ea4fc2411b863ce5e8eb56290fa99f0feee47..8e3060d768edd78f173a4f02a6f6e74c870bef1a 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  
  #include "gpiolib.h"
  
-@@ -507,3 +509,72 @@ void of_gpiochip_remove(struct gpio_chip
+@@ -660,3 +662,72 @@ void of_gpiochip_remove(struct gpio_chip
        gpiochip_remove_pin_ranges(chip);
        of_node_put(chip->of_node);
  }
@@ -112,7 +112,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  {
 --- a/include/linux/gpio/consumer.h
 +++ b/include/linux/gpio/consumer.h
-@@ -451,6 +451,7 @@ struct gpio_desc *devm_fwnode_get_gpiod_
+@@ -533,6 +533,7 @@ struct gpio_desc *devm_fwnode_get_gpiod_
  
  #if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS)
  
@@ -120,7 +120,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  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);
-@@ -458,6 +459,13 @@ void gpiod_unexport(struct gpio_desc *de
+@@ -540,6 +541,13 @@ void gpiod_unexport(struct gpio_desc *de
  
  #else  /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */
  
@@ -136,7 +136,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  {
 --- a/drivers/gpio/gpiolib-sysfs.c
 +++ b/drivers/gpio/gpiolib-sysfs.c
-@@ -553,7 +553,7 @@ static struct class gpio_class = {
+@@ -568,7 +568,7 @@ static struct class gpio_class = {
   *
   * Returns zero on success, else an error.
   */
@@ -145,7 +145,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  {
        struct gpio_chip        *chip;
        struct gpio_device      *gdev;
-@@ -615,6 +615,8 @@ int gpiod_export(struct gpio_desc *desc,
+@@ -630,6 +630,8 @@ int gpiod_export(struct gpio_desc *desc,
        offset = gpio_chip_hwgpio(desc);
        if (chip->names && chip->names[offset])
                ioname = chip->names[offset];
@@ -154,7 +154,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  
        dev = device_create_with_groups(&gpio_class, &gdev->dev,
                                        MKDEV(0, 0), data, gpio_groups,
-@@ -636,6 +638,12 @@ err_unlock:
+@@ -651,6 +653,12 @@ err_unlock:
        gpiod_dbg(desc, "%s: status %d\n", __func__, status);
        return status;
  }