mirror of
https://github.com/openwrt/openwrt.git
synced 2025-04-13 06:03:22 +00:00
realtek: fix RTL8231 gpio count
The RTL8231's gpio_chip.ngpio was set to 36, which is the largest valid GPIO index. Fix the allowed number of GPIOs by setting ngpio to 37, the actual line count. Reported-by: INAGAKI Hiroshi <musashino.open@gmail.com> Signed-off-by: Sander Vanheule <sander@svanheule.net> Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
parent
eef7f17652
commit
851212a714
@ -312,7 +312,7 @@ static int rtl8231_gpio_probe(struct platform_device *pdev)
|
||||
|
||||
gpios->dev = dev;
|
||||
gpios->gc.base = 160;
|
||||
gpios->gc.ngpio = 36;
|
||||
gpios->gc.ngpio = 37;
|
||||
gpios->gc.label = "rtl8231";
|
||||
gpios->gc.parent = dev;
|
||||
gpios->gc.owner = THIS_MODULE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user