mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
gpio: imx-scu: don't check the GPIO range
Core GPIO code already does this for drivers, no need to duplicate the check. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-1-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
parent
d1d52c6622
commit
57bbc60be4
|
|
@ -37,9 +37,6 @@ static int imx_scu_gpio_get(struct gpio_chip *chip, unsigned int offset)
|
|||
int level;
|
||||
int err;
|
||||
|
||||
if (offset >= chip->ngpio)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&priv->lock);
|
||||
|
||||
/* to read PIN state via scu api */
|
||||
|
|
@ -60,9 +57,6 @@ static void imx_scu_gpio_set(struct gpio_chip *chip, unsigned int offset, int va
|
|||
struct scu_gpio_priv *priv = gpiochip_get_data(chip);
|
||||
int err;
|
||||
|
||||
if (offset >= chip->ngpio)
|
||||
return;
|
||||
|
||||
mutex_lock(&priv->lock);
|
||||
|
||||
/* to set PIN output level via scu api */
|
||||
|
|
@ -77,9 +71,6 @@ static void imx_scu_gpio_set(struct gpio_chip *chip, unsigned int offset, int va
|
|||
|
||||
static int imx_scu_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
|
||||
{
|
||||
if (offset >= chip->ngpio)
|
||||
return -EINVAL;
|
||||
|
||||
return GPIO_LINE_DIRECTION_OUT;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user