realtek: use automatic GPIO numbering for RTL8231
authorSander Vanheule <sander@svanheule.net>
Sat, 20 Nov 2021 19:11:32 +0000 (20:11 +0100)
committerStijn Tintel <stijn@linux-ipv6.be>
Thu, 17 Feb 2022 17:11:33 +0000 (19:11 +0200)
Set the gpio_chip.base to -1 to use automatic GPIO line indexing.
Setting base to 0 or a positive number is deprecated and should not be
used.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
target/linux/realtek/files-5.10/drivers/gpio/gpio-rtl8231.c

index f06c2d81df79e5d371690e61d10b5e50d7142ed4..013dc238389ba878e4688cf67fc316cb57ed7f90 100644 (file)
@@ -311,7 +311,7 @@ static int rtl8231_gpio_probe(struct platform_device *pdev)
        rtl8231_init(gpios);
 
        gpios->dev = dev;
-       gpios->gc.base = 160;
+       gpios->gc.base = -1;
        gpios->gc.ngpio = 37;
        gpios->gc.label = "rtl8231";
        gpios->gc.parent = dev;