aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers/gpio/gpio-nxp-74hc153.c
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-02-15 19:45:29 +0000
committerJohn Crispin <john@openwrt.org>2015-02-15 19:45:29 +0000
commit7e4b3de2493f024432935e283f5eeb2920957871 (patch)
tree10524efa8132ebe05e93a75a10ef3ca733edea0e /target/linux/ar71xx/files/drivers/gpio/gpio-nxp-74hc153.c
parent9b1c7a9de4a2734b701660a9f3720e842626aea3 (diff)
downloadupstream-7e4b3de2493f024432935e283f5eeb2920957871.tar.gz
upstream-7e4b3de2493f024432935e283f5eeb2920957871.tar.bz2
upstream-7e4b3de2493f024432935e283f5eeb2920957871.zip
ar71xx: add v3.18 support
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 44456
Diffstat (limited to 'target/linux/ar71xx/files/drivers/gpio/gpio-nxp-74hc153.c')
-rw-r--r--target/linux/ar71xx/files/drivers/gpio/gpio-nxp-74hc153.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/target/linux/ar71xx/files/drivers/gpio/gpio-nxp-74hc153.c b/target/linux/ar71xx/files/drivers/gpio/gpio-nxp-74hc153.c
index 5bdeb3d557..8c01efe4a0 100644
--- a/target/linux/ar71xx/files/drivers/gpio/gpio-nxp-74hc153.c
+++ b/target/linux/ar71xx/files/drivers/gpio/gpio-nxp-74hc153.c
@@ -8,6 +8,7 @@
* published by the Free Software Foundation.
*/
+#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/gpio.h>
@@ -198,6 +199,7 @@ static int nxp_74hc153_remove(struct platform_device *pdev)
struct nxp_74hc153_platform_data *pdata = pdev->dev.platform_data;
if (nxp) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)
int err;
err = gpiochip_remove(&nxp->gpio_chip);
@@ -207,7 +209,9 @@ static int nxp_74hc153_remove(struct platform_device *pdev)
err);
return err;
}
-
+#else
+ gpiochip_remove(&nxp->gpio_chip);
+#endif
gpio_free(pdata->gpio_pin_2y);
gpio_free(pdata->gpio_pin_1y);
gpio_free(pdata->gpio_pin_s1);