[source] leds-apu2: add compatibility for linux 4.9
LEDE Commits
lede-commits at lists.infradead.org
Wed Feb 1 08:50:11 PST 2017
nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/185c37467ead7892bd085cd87071e5d18f811431
commit 185c37467ead7892bd085cd87071e5d18f811431
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Jan 27 11:55:22 2017 +0100
leds-apu2: add compatibility for linux 4.9
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
package/kernel/leds-apu2/src/leds-apu2.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/kernel/leds-apu2/src/leds-apu2.c b/package/kernel/leds-apu2/src/leds-apu2.c
index 00f80a3..0a60df1 100644
--- a/package/kernel/leds-apu2/src/leds-apu2.c
+++ b/package/kernel/leds-apu2/src/leds-apu2.c
@@ -194,7 +194,11 @@ static int gpio_apu2_probe (struct platform_device *dev)
}
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
gpio_apu2_chip.dev = &dev->dev;
+#else
+ gpio_apu2_chip.parent = &dev->dev;
+#endif
ret = gpiochip_add (&gpio_apu2_chip);
if (ret) {
pr_err ("%s: adding gpiochip failed\n", DEVNAME);
More information about the lede-commits
mailing list