]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
bcm2835-gpio-exp: Copy/paste error adding base twice
authorDave Stevenson <dave.stevenson@raspberrypi.org>
Tue, 14 Mar 2017 14:23:06 +0000 (14:23 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 19 Sep 2017 10:07:56 +0000 (12:07 +0200)
brcmexp_gpio_set was adding gpio->gc.base to the offset
twice, so passing an invalid number to the mailbox service.
The firmware treated it modulo-8 anyway, but was logging an
assert every time.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/gpio/gpio-bcm-exp.c

index 681a91492d4c33bdfd42416e069218e8611cc4d9..d68adafaee4ad406f45f4ff0d6b7c1ad5d10e330 100644 (file)
@@ -165,8 +165,6 @@ static void brcmexp_gpio_set(struct gpio_chip *gc, unsigned int off, int val)
 
        gpio = container_of(gc, struct brcmexp_gpio, gc);
 
-       off += gpio->gc.base;
-
        set.gpio = off + gpio->gc.base; /* GPIO to update */
        set.state = val;        /* Output state */