From: Felix Fietkau Date: Fri, 27 Jan 2017 10:55:22 +0000 (+0100) Subject: leds-apu2: add compatibility for linux 4.9 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=185c37467ead7892bd085cd87071e5d18f811431;p=openwrt%2Fstaging%2Fwigyori.git leds-apu2: add compatibility for linux 4.9 Signed-off-by: Felix Fietkau --- diff --git a/package/kernel/leds-apu2/src/leds-apu2.c b/package/kernel/leds-apu2/src/leds-apu2.c index 00f80a3fa8..0a60df1bc3 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);