aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/gpio-nct5104d/src
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-05-13 14:00:57 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-05-17 18:35:51 +0200
commitb510ab513e19a0ee4371aa23bb1a9f50aa2101e8 (patch)
treee12df8a820808a6ca2d1e95161935aad93cf7829 /package/kernel/gpio-nct5104d/src
parentc00b2df6c8e421ea7aa96f53178dc85db99f2305 (diff)
downloadupstream-b510ab513e19a0ee4371aa23bb1a9f50aa2101e8.tar.gz
upstream-b510ab513e19a0ee4371aa23bb1a9f50aa2101e8.tar.bz2
upstream-b510ab513e19a0ee4371aa23bb1a9f50aa2101e8.zip
kernel: drop outdated kernel version switches for local code
This drops kernel version switches for versions not supported by OpenWrt master at the moment. This only adjusts local code, but doesn't touch patches to existing external packages. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'package/kernel/gpio-nct5104d/src')
-rw-r--r--package/kernel/gpio-nct5104d/src/gpio-nct5104d.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
index 8da7580562..8f180edd33 100644
--- a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
+++ b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
@@ -276,11 +276,7 @@ static int nct5104d_gpio_probe(struct platform_device *pdev)
for (i = 0; i < data->nr_bank; i++) {
struct nct5104d_gpio_bank *bank = &data->bank[i];
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
- bank->chip.dev = &pdev->dev;
-#else
bank->chip.parent = &pdev->dev;
-#endif
bank->data = data;
err = gpiochip_add(&bank->chip);
@@ -298,15 +294,7 @@ err_gpiochip:
for (i = i - 1; i >= 0; i--) {
struct nct5104d_gpio_bank *bank = &data->bank[i];
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
- int rm_err = gpiochip_remove(&bank->chip);
- if (rm_err < 0)
- dev_err(&pdev->dev,
- "Failed to remove gpiochip %d: %d\n",
- i, rm_err);
-#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
gpiochip_remove (&bank->chip);
-#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
}
return err;
@@ -320,17 +308,7 @@ static int nct5104d_gpio_remove(struct platform_device *pdev)
for (i = 0; i < data->nr_bank; i++) {
struct nct5104d_gpio_bank *bank = &data->bank[i];
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
- int err = gpiochip_remove(&bank->chip);
- if (err) {
- dev_err(&pdev->dev,
- "Failed to remove GPIO gpiochip %d: %d\n",
- i, err);
- return err;
- }
-#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
gpiochip_remove (&bank->chip);
-#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
}
return 0;