[PATCH 2/8] bcm2835-gpio-exp: Copy/paste error adding base twice
Paolo Pisati
paolo.pisati at canonical.com
Fri Jan 11 14:17:47 UTC 2019
From: Dave Stevenson <dave.stevenson at 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 at raspberrypi.org>
(cherry picked from commit 8308f3f93b7360bda893c18801e22d62c1d61378
https://github.com/raspberrypi/linux rpi-4.9.y)
Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
---
drivers/gpio/gpio-bcm-exp.c | 2 --
1 file changed, 2 deletions(-)
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 */
--
2.7.4
More information about the kernel-team
mailing list