From d682d368eeeaae56063859b2503c75fc4299022b Mon Sep 17 00:00:00 2001 From: Edward Hill Date: Thu, 23 Jan 2020 16:18:53 -0700 Subject: ioexpander: Fix IOEX_INT after ioex_signal numbering change Fix ioex_is_valid_interrupt_signal() and IOEX_INT() to account for IOEX_SIGNAL_START correctly. BUG=none BRANCH=none TEST=ioex_enable_interrupt() returns success Change-Id: I8f13fa8f2d645aae565ac1062eab4a4d0968c4bc Signed-off-by: Edward Hill Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2031649 Reviewed-by: Denis Brockus Commit-Queue: Denis Brockus --- common/ioexpander.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/ioexpander.c') diff --git a/common/ioexpander.c b/common/ioexpander.c index e130e77a8a..de64bafc7e 100644 --- a/common/ioexpander.c +++ b/common/ioexpander.c @@ -51,7 +51,7 @@ static int ioex_is_valid_interrupt_signal(enum ioex_signal signal) const struct ioex_info *g = ioex_get_signal_info(signal); /* Fail if no interrupt handler */ - if (signal >= ioex_ih_count) + if (signal - IOEX_SIGNAL_START >= ioex_ih_count) return EC_ERROR_PARAM1; drv = ioex_config[g->ioex].drv; -- cgit v1.2.1