diff options
author | Luka Perkov <luka@openwrt.org> | 2015-02-08 15:42:42 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2015-02-08 15:42:42 +0000 |
commit | 4b0fbf30726cf6807508b7025fef023439e07572 (patch) | |
tree | d1eb7cd69c5d7d1371ec053c2788b3287e6a8d16 /target/linux/ramips/patches-3.14/0058-GPIO-add-named-gpio-exports.patch | |
parent | 6b8f598ca648505d49993da4fbdbb4268b8aee10 (diff) | |
download | mtk-20170518-4b0fbf30726cf6807508b7025fef023439e07572.zip mtk-20170518-4b0fbf30726cf6807508b7025fef023439e07572.tar.gz mtk-20170518-4b0fbf30726cf6807508b7025fef023439e07572.tar.bz2 |
ramips: fix patches after 3.14.32 bump
Signed-off-by: Luka Perkov <luka@openwrt.org>
SVN-Revision: 44324
Diffstat (limited to 'target/linux/ramips/patches-3.14/0058-GPIO-add-named-gpio-exports.patch')
-rw-r--r-- | target/linux/ramips/patches-3.14/0058-GPIO-add-named-gpio-exports.patch | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/target/linux/ramips/patches-3.14/0058-GPIO-add-named-gpio-exports.patch b/target/linux/ramips/patches-3.14/0058-GPIO-add-named-gpio-exports.patch index 9c2b39d..c59153c 100644 --- a/target/linux/ramips/patches-3.14/0058-GPIO-add-named-gpio-exports.patch +++ b/target/linux/ramips/patches-3.14/0058-GPIO-add-named-gpio-exports.patch @@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> struct gpio_desc; -@@ -296,3 +298,69 @@ void of_gpiochip_remove(struct gpio_chip +@@ -302,3 +304,69 @@ void of_gpiochip_remove(struct gpio_chip if (chip->of_node) of_node_put(chip->of_node); } @@ -94,7 +94,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +device_initcall(of_gpio_export_init); --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c -@@ -803,7 +803,7 @@ static struct class gpio_class = { +@@ -798,7 +798,7 @@ static struct class gpio_class = { * * Returns zero on success, else an error. */ @@ -103,17 +103,17 @@ Signed-off-by: John Crispin <blogic@openwrt.org> { unsigned long flags; int status; -@@ -843,7 +843,8 @@ int gpiod_export(struct gpio_desc *desc, - offset = gpio_chip_hwgpio(desc); +@@ -839,6 +839,9 @@ int gpiod_export(struct gpio_desc *desc, if (desc->chip->names && desc->chip->names[offset]) ioname = desc->chip->names[offset]; -- + + if (name) + ioname = name; - dev = device_create(&gpio_class, desc->chip->dev, MKDEV(0, 0), - desc, ioname ? ioname : "gpio%u", - desc_to_gpio(desc)); -@@ -880,6 +881,12 @@ fail_unlock: ++ + dev = device_create_with_groups(&gpio_class, desc->chip->dev, + MKDEV(0, 0), desc, gpio_groups, + ioname ? ioname : "gpio%u", +@@ -874,6 +877,12 @@ fail_unlock: gpiod_dbg(desc, "%s: status %d\n", __func__, status); return status; } |