[source] gpio-nct5104d: add compatibility for linux 4.9
LEDE Commits
lede-commits at lists.infradead.org
Wed Feb 1 08:50:10 PST 2017
nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/139eb6870bc11fab6bc116334f35215aa1e46bb9
commit 139eb6870bc11fab6bc116334f35215aa1e46bb9
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Jan 27 11:55:12 2017 +0100
gpio-nct5104d: add compatibility for linux 4.9
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
package/kernel/gpio-nct5104d/src/gpio-nct5104d.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
index a37a1d0..1ad1a6b 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);
More information about the lede-commits
mailing list