aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-05-26 13:29:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-05-26 13:29:16 -0700
commit91a304340a2272b1941c9ac81d57c68f97e6260d (patch)
tree359f62923b64d004c53188a445a7be7c252edb9e /drivers/gpio/gpiolib.c
parentMerge tag 'for-6.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux (diff)
parentgpio-f7188x: fix chip name and pin count on Nuvoton chip (diff)
downloadwireguard-linux-91a304340a2272b1941c9ac81d57c68f97e6260d.tar.xz
wireguard-linux-91a304340a2272b1941c9ac81d57c68f97e6260d.zip
Merge tag 'gpio-fixes-for-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fixes from Bartosz Golaszewski: - fix incorrect output in in-tree gpio tools - fix a shell coding issue in gpio-sim selftests - correctly set the permissions for debugfs attributes exposed by gpio-mockup - fix chip name and pin count in gpio-f7188x for one of the supported models - fix numberspace pollution when using dynamically and statically allocated GPIOs together * tag 'gpio-fixes-for-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio-f7188x: fix chip name and pin count on Nuvoton chip gpiolib: fix allocation of mixed dynamic/static GPIOs gpio: mockup: Fix mode of debugfs files selftests: gpio: gpio-sim: Fix BUG: test FAILED due to recent change tools: gpio: fix debounce_period_us output of lsgpio
Diffstat (limited to '')
-rw-r--r--drivers/gpio/gpiolib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 04fb05df805b..a7220e04a93e 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -209,6 +209,8 @@ static int gpiochip_find_base(int ngpio)
break;
/* nope, check the space right after the chip */
base = gdev->base + gdev->ngpio;
+ if (base < GPIO_DYNAMIC_BASE)
+ base = GPIO_DYNAMIC_BASE;
}
if (gpio_is_valid(base)) {