diff options
author | Alexandru M Stan <amstan@chromium.org> | 2014-09-16 14:14:16 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-09-24 06:25:39 +0000 |
commit | aa57f29aa4e458150754e4629999c0b403f57dad (patch) | |
tree | 67f48dc2513a719bdc92aac28c3e255033e7e64e | |
parent | cf62055270fa35fb613db3a850c81e6a9bc01af0 (diff) | |
download | chrome-ec-aa57f29aa4e458150754e4629999c0b403f57dad.tar.gz |
stm32/gpio: Supress overriding interrupt warning in some cases
The warning should only warn if there's an actual danger(in order to give a
clue to developers that something might be amiss). Messages like "Overriding
SPI1_NSS with SPI1_NSS on EXTI4" are just spammy. This patch makes it so it only
warns if the interrupt is different.
BUG=chrome-os-partner:31390
TEST=spam gpio_enable_interrupt(GPIO_SPI1_NSS); in a bunch of places (like
spi_event), it should not complain about the interrupt being set to the same
thing before. Whereas before it was so spammy it did not even have time to reply
to SPI.
BRANCH=None
Change-Id: I786a821eb8167e3568d0be371c4de26bb124431a
Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/218563
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | chip/stm32/gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/stm32/gpio.c b/chip/stm32/gpio.c index df65aba533..37dc7adbbb 100644 --- a/chip/stm32/gpio.c +++ b/chip/stm32/gpio.c @@ -79,7 +79,7 @@ int gpio_enable_interrupt(enum gpio_signal signal) bit = 31 - __builtin_clz(g->mask); - if (exti_events[bit]) { + if ((exti_events[bit]) && (exti_events[bit] != g)) { CPRINTS("Overriding %s with %s on EXTI%d", exti_events[bit]->name, g->name, bit); } |