gpio-nct5104d: add compatibility for linux 4.9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
71e86199ff
commit
139eb6870b
1 changed files with 4 additions and 0 deletions
|
@ -275,7 +275,11 @@ static int nct5104d_gpio_probe(struct platform_device *pdev)
|
||||||
for (i = 0; i < data->nr_bank; i++) {
|
for (i = 0; i < data->nr_bank; i++) {
|
||||||
struct nct5104d_gpio_bank *bank = &data->bank[i];
|
struct nct5104d_gpio_bank *bank = &data->bank[i];
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
|
||||||
bank->chip.dev = &pdev->dev;
|
bank->chip.dev = &pdev->dev;
|
||||||
|
#else
|
||||||
|
bank->chip.parent = &pdev->dev;
|
||||||
|
#endif
|
||||||
bank->data = data;
|
bank->data = data;
|
||||||
|
|
||||||
err = gpiochip_add(&bank->chip);
|
err = gpiochip_add(&bank->chip);
|
||||||
|
|
Loading…
Reference in a new issue