projects
/
openwrt
/
staging
/
luka.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71e8619
)
gpio-nct5104d: add compatibility for linux 4.9
author
Felix Fietkau
<nbd@nbd.name>
Fri, 27 Jan 2017 10:55:12 +0000
(11:55 +0100)
committer
Felix Fietkau
<nbd@nbd.name>
Wed, 1 Feb 2017 16:49:52 +0000
(17:49 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
patch
|
blob
|
history
diff --git
a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
index a37a1d056d07e66a5a2e26b1b04609daee184580..1ad1a6b10a0a81202be2d688398c45ebe76134b7 100644
(file)
--- 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);