From bc188bd4f8643e1b54a8148d11f72cddb09882d6 Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Tue, 17 Dec 2019 10:57:31 +0000 Subject: [PATCH] arm64: rockchip: rk_gpio: Fix pin number The maxpin counter starts at 0, fix one by one error. This is still not totally correct for some banks in some SoC that have fewer pins but this will be dealt with in another commit. MFC after: 3 days --- sys/arm64/rockchip/rk_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/rockchip/rk_gpio.c b/sys/arm64/rockchip/rk_gpio.c index 6dcba32d36f9..06ec95e9d64a 100644 --- a/sys/arm64/rockchip/rk_gpio.c +++ b/sys/arm64/rockchip/rk_gpio.c @@ -194,7 +194,7 @@ rk_gpio_pin_max(device_t dev, int *maxpin) /* Each bank have always 32 pins */ /* XXX not true*/ - *maxpin = 32; + *maxpin = 31; return (0); }