[2/8] bcm2835-gpio-exp: Copy/paste error adding base twice

Message ID 1547216273-19433-3-git-send-email-paolo.pisati@canonical.com
State New
Headers show
Series
  • Fix led triggers on Rpi3b+
Related show

Commit Message

Paolo Pisati Jan. 11, 2019, 2:17 p.m.
From: Dave Stevenson <dave.stevenson@raspberrypi.org>

BugLink: http://bugs.launchpad.net/bugs/1808366

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>
(cherry picked from commit 8308f3f93b7360bda893c18801e22d62c1d61378
https://github.com/raspberrypi/linux rpi-4.9.y)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
---
 drivers/gpio/gpio-bcm-exp.c | 2 --
 1 file changed, 2 deletions(-)

Patch

diff --git a/drivers/gpio/gpio-bcm-exp.c b/drivers/gpio/gpio-bcm-exp.c
index 681a914..d68adaf 100644
--- a/drivers/gpio/gpio-bcm-exp.c
+++ b/drivers/gpio/gpio-bcm-exp.c
@@ -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 */