diff mbox series

[2/3] realtek: Use automatic GPIO numbering for RTL8231

Message ID 84392f972af6176b565cdf408a1174bb43efea3c.1637006759.git.sander@svanheule.net
State Superseded
Headers show
Series realtek: RTL8231 refinements | expand

Commit Message

Sander Vanheule Nov. 15, 2021, 8:08 p.m. UTC
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>
---
 target/linux/realtek/files-5.10/drivers/gpio/gpio-rtl8231.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/target/linux/realtek/files-5.10/drivers/gpio/gpio-rtl8231.c b/target/linux/realtek/files-5.10/drivers/gpio/gpio-rtl8231.c
index f06c2d81df79..013dc238389b 100644
--- a/target/linux/realtek/files-5.10/drivers/gpio/gpio-rtl8231.c
+++ b/target/linux/realtek/files-5.10/drivers/gpio/gpio-rtl8231.c
@@ -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;