From: Felix Fietkau Date: Fri, 27 Jan 2017 10:55:12 +0000 (+0100) Subject: gpio-nct5104d: add compatibility for linux 4.9 X-Git-Tag: v18.06.0-rc1~3858 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=139eb6870bc11fab6bc116334f35215aa1e46bb9;p=openwrt%2Fstaging%2Fchunkeey.git gpio-nct5104d: add compatibility for linux 4.9 Signed-off-by: Felix Fietkau --- diff --git a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c index a37a1d056d..1ad1a6b10a 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);