diff options
author | Denis Brockus <dbrockus@chromium.org> | 2019-06-14 09:35:34 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-06-17 03:21:12 +0000 |
commit | 470a9586fd8d897a847e52a65debc00001c1d565 (patch) | |
tree | baf15ed7dc48d0cb993b60946e5f758c00aa01e3 /chip/ish/gpio.c | |
parent | 70e9e80590d05bad7dbd44fc4d2613633e7b98eb (diff) | |
download | chrome-ec-470a9586fd8d897a847e52a65debc00001c1d565.tar.gz |
ish: remove conditional compilation where possible
Removed many of the #if conditions and replaced them with IS_ENABLED
BUG=b:132178013
BRANCH=none
TEST=make buildall -j
TEST=verify basic ish ec functionality
Change-Id: I39c1d2dfdb39baa06e53746789d0b6a648275ed9
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1660021
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'chip/ish/gpio.c')
-rw-r--r-- | chip/ish/gpio.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/chip/ish/gpio.c b/chip/ish/gpio.c index 18890c111d..3d374f3cb8 100644 --- a/chip/ish/gpio.c +++ b/chip/ish/gpio.c @@ -55,13 +55,12 @@ void gpio_set_flags_by_mask(uint32_t port, uint32_t mask, uint32_t flags) } /* ISH 3 can't support both rising and falling edge */ -#ifdef CHIP_FAMILY_ISH3 - if ((flags & GPIO_INT_F_RISING) && (flags & GPIO_INT_F_FALLING)) { + if (IS_ENABLED(CHIP_FAMILY_ISH3) && + (flags & GPIO_INT_F_RISING) && (flags & GPIO_INT_F_FALLING)) { ccprintf("\n\nISH 2/3 does not support both rising & falling " "edge for %d 0x%02x\n\n", port, mask); } -#endif /* GPSR/GPCR Output high/low */ if (flags & GPIO_HIGH) /* Output high */ |