linux-brain/drivers/pinctrl/samsung
Jaehyoung Choi b900cc4816 pinctrl: samsung: Fix pinctrl bank pin count
[ Upstream commit 70115558ab02fe8d28a6634350b3491a542aaa02 ]

Commit 1abd18d1a5 ("pinctrl: samsung: Register pinctrl before GPIO")
changes the order of GPIO and pinctrl registration: now pinctrl is
registered before GPIO. That means gpio_chip->ngpio is not set when
samsung_pinctrl_register() called, and one cannot rely on that value
anymore. Use `pin_bank->nr_pins' instead of `pin_bank->gpio_chip.ngpio'
to fix mentioned inconsistency.

Fixes: 1abd18d1a5 ("pinctrl: samsung: Register pinctrl before GPIO")
Signed-off-by: Jaehyoung Choi <jkkkkk.choi@samsung.com>
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Link: https://lore.kernel.org/r/20210730192905.7173-1-semen.protsenko@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-22 12:26:23 +02:00
..
Kconfig pinctrl: samsung: Remove support for Exynos5440 2018-05-02 19:08:55 +02:00
Makefile pinctrl: samsung: Remove support for Exynos5440 2018-05-02 19:08:55 +02:00
pinctrl-exynos-arm.c pinctrl: samsung: fix leaked of_node references 2019-04-23 10:59:47 +02:00
pinctrl-exynos-arm64.c pinctrl: samsung: Document required order of banks 2018-04-18 17:48:39 +02:00
pinctrl-exynos.c pinctrl: samsung: use 'int' for register masks in Exynos 2021-05-19 10:08:22 +02:00
pinctrl-exynos.h pinctrl: samsung: Fix suspend/resume for Exynos5433 GPF1..5 banks 2018-05-23 21:23:19 +02:00
pinctrl-s3c24xx.c pinctrl: samsung: Fix device node refcount leaks in S3C24xx wakeup controller init 2019-12-17 19:56:38 +01:00
pinctrl-s3c64xx.c pinctrl: samsung: Fix device node refcount leaks in S3C64xx wakeup controller init 2019-12-17 19:56:39 +01:00
pinctrl-samsung.c pinctrl: samsung: Fix pinctrl bank pin count 2021-09-22 12:26:23 +02:00
pinctrl-samsung.h pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00