aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-xlp.c
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-10-16 21:50:56 +0000
committersaturneric <[email protected]>2025-10-16 21:50:56 +0000
commit5293dcd7ffda472dbf326c81877bb63d2bfcbd10 (patch)
treeda3be05c4aa1646e5f26a84cd75d83fe866c5358 /drivers/gpio/gpio-xlp.c
parentMerge tag 'v6.16' (diff)
parentLinux 6.17 (diff)
downloadkernel-5293dcd7ffda472dbf326c81877bb63d2bfcbd10.tar.gz
kernel-5293dcd7ffda472dbf326c81877bb63d2bfcbd10.zip
Merge tag 'v6.17'
Linux 6.17
Diffstat (limited to 'drivers/gpio/gpio-xlp.c')
-rw-r--r--drivers/gpio/gpio-xlp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-xlp.c b/drivers/gpio/gpio-xlp.c
index b4b52213bcd9..aede6324387f 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,16 +224,16 @@ 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);
}
-static void xlp_gpio_set(struct gpio_chip *gc, unsigned gpio, int state)
+static int xlp_gpio_set(struct gpio_chip *gc, unsigned int 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);
+
+ return 0;
}
static int xlp_gpio_probe(struct platform_device *pdev)