From 185c37467ead7892bd085cd87071e5d18f811431 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 27 Jan 2017 11:55:22 +0100 Subject: [PATCH] leds-apu2: add compatibility for linux 4.9 Signed-off-by: Felix Fietkau --- 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 00f80a3fa8b..0a60df1bc30 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); -- 2.30.2