aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-xlp.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <[email protected]>2025-07-09 06:41:48 +0000
committerBartosz Golaszewski <[email protected]>2025-07-15 07:54:41 +0000
commitc719fd3e3991b16460babf70036bf39cdbbb7a90 (patch)
treec174855df9ccd06e1596617504d55936cca04c4e /drivers/gpio/gpio-xlp.c
parentgpio: xilinx: use new GPIO line value setter callbacks (diff)
downloadkernel-c719fd3e3991b16460babf70036bf39cdbbb7a90.tar.gz
kernel-c719fd3e3991b16460babf70036bf39cdbbb7a90.zip
gpio: xlp: drop unneeded ngpio checks
GPIO core already makes sure that offsets higher than the number of GPIOs are never passed to controller callbacks. We can remove the unnecessary check. Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-11-b8950f69618d@linaro.org Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'drivers/gpio/gpio-xlp.c')
-rw-r--r--drivers/gpio/gpio-xlp.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-xlp.c b/drivers/gpio/gpio-xlp.c
index b4b52213bcd9..35b376c73ce3 100644
--- a/drivers/gpio/gpio-xlp.c
+++ b/drivers/gpio/gpio-xlp.c
@@ -206,7 +206,6 @@ static int xlp_gpio_dir_output(struct gpio_chip *gc, unsigned gpio, int state)
{
struct xlp_gpio_priv *priv = gpiochip_get_data(gc);
- BUG_ON(gpio >= gc->ngpio);
xlp_gpio_set_reg(priv->gpio_out_en, gpio, 0x1);
return 0;
@@ -216,7 +215,6 @@ static int xlp_gpio_dir_input(struct gpio_chip *gc, unsigned gpio)
{
struct xlp_gpio_priv *priv = gpiochip_get_data(gc);
- BUG_ON(gpio >= gc->ngpio);
xlp_gpio_set_reg(priv->gpio_out_en, gpio, 0x0);
return 0;
@@ -226,7 +224,6 @@ static int xlp_gpio_get(struct gpio_chip *gc, unsigned gpio)
{
struct xlp_gpio_priv *priv = gpiochip_get_data(gc);
- BUG_ON(gpio >= gc->ngpio);
return xlp_gpio_get_reg(priv->gpio_paddrv, gpio);
}
@@ -234,7 +231,6 @@ static void xlp_gpio_set(struct gpio_chip *gc, unsigned gpio, int state)
{
struct xlp_gpio_priv *priv = gpiochip_get_data(gc);
- BUG_ON(gpio >= gc->ngpio);
xlp_gpio_set_reg(priv->gpio_paddrv, gpio, state);
}