summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-04-28 11:18:11 (GMT)
committerLinus Walleij <linus.walleij@linaro.org>2016-04-28 12:36:31 (GMT)
commit682366d5c93340b751bc547779209f502a80762e (patch)
treee750d93936daeab968c15cc5c558731fc1febd00
parent451938d52fe838c766687484fd9a69e35d8a68bc (diff)
downloadlinux-682366d5c93340b751bc547779209f502a80762e.tar.xz
gpio: pl061: remove range check
The gpiochip calls are already checking that the GPIO line offsets are in range. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/gpio/gpio-pl061.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
index 9afb415..70eb9ad 100644
--- a/drivers/gpio/gpio-pl061.c
+++ b/drivers/gpio/gpio-pl061.c
@@ -67,9 +67,6 @@ static int pl061_direction_input(struct gpio_chip *gc, unsigned offset)
unsigned long flags;
unsigned char gpiodir;
- if (offset >= gc->ngpio)
- return -EINVAL;
-
spin_lock_irqsave(&chip->lock, flags);
gpiodir = readb(chip->base + GPIODIR);
gpiodir &= ~(BIT(offset));
@@ -86,9 +83,6 @@ static int pl061_direction_output(struct gpio_chip *gc, unsigned offset,
unsigned long flags;
unsigned char gpiodir;
- if (offset >= gc->ngpio)
- return -EINVAL;
-
spin_lock_irqsave(&chip->lock, flags);
writeb(!!value << offset, chip->base + (BIT(offset + 2)));
gpiodir = readb(chip->base + GPIODIR);