aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/gpio-nct5104d/src
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-01-27 11:55:12 +0100
committerFelix Fietkau <nbd@nbd.name>2017-02-01 17:49:52 +0100
commit139eb6870bc11fab6bc116334f35215aa1e46bb9 (patch)
tree09b8bb10d4a93c7d35d4aa618b3ec4de68571808 /package/kernel/gpio-nct5104d/src
parent71e86199ff192538ce9fde59e563e7f54ce9f99a (diff)
downloadupstream-139eb6870bc11fab6bc116334f35215aa1e46bb9.tar.gz
upstream-139eb6870bc11fab6bc116334f35215aa1e46bb9.tar.bz2
upstream-139eb6870bc11fab6bc116334f35215aa1e46bb9.zip
gpio-nct5104d: add compatibility for linux 4.9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/gpio-nct5104d/src')
-rw-r--r--package/kernel/gpio-nct5104d/src/gpio-nct5104d.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
index a37a1d056d..1ad1a6b10a 100644
--- a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
+++ b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
@@ -275,7 +275,11 @@ 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);