diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-01-27 11:55:22 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-02-01 17:49:52 +0100 |
commit | 185c37467ead7892bd085cd87071e5d18f811431 (patch) | |
tree | 4589200cb6fe4ba64343305ea5f2b3add3c8347e /package/kernel/leds-apu2 | |
parent | 139eb6870bc11fab6bc116334f35215aa1e46bb9 (diff) | |
download | upstream-185c37467ead7892bd085cd87071e5d18f811431.tar.gz upstream-185c37467ead7892bd085cd87071e5d18f811431.tar.bz2 upstream-185c37467ead7892bd085cd87071e5d18f811431.zip |
leds-apu2: add compatibility for linux 4.9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/leds-apu2')
-rw-r--r-- | package/kernel/leds-apu2/src/leds-apu2.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |