forked from Minki/linux
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>
This commit is contained in:
parent
451938d52f
commit
682366d5c9
@ -67,9 +67,6 @@ static int pl061_direction_input(struct gpio_chip *gc, unsigned offset)
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned char gpiodir;
|
unsigned char gpiodir;
|
||||||
|
|
||||||
if (offset >= gc->ngpio)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
spin_lock_irqsave(&chip->lock, flags);
|
spin_lock_irqsave(&chip->lock, flags);
|
||||||
gpiodir = readb(chip->base + GPIODIR);
|
gpiodir = readb(chip->base + GPIODIR);
|
||||||
gpiodir &= ~(BIT(offset));
|
gpiodir &= ~(BIT(offset));
|
||||||
@ -86,9 +83,6 @@ static int pl061_direction_output(struct gpio_chip *gc, unsigned offset,
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned char gpiodir;
|
unsigned char gpiodir;
|
||||||
|
|
||||||
if (offset >= gc->ngpio)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
spin_lock_irqsave(&chip->lock, flags);
|
spin_lock_irqsave(&chip->lock, flags);
|
||||||
writeb(!!value << offset, chip->base + (BIT(offset + 2)));
|
writeb(!!value << offset, chip->base + (BIT(offset + 2)));
|
||||||
gpiodir = readb(chip->base + GPIODIR);
|
gpiodir = readb(chip->base + GPIODIR);
|
||||||
|
Loading…
Reference in New Issue
Block a user