diff options
author | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2023-02-28 07:25:52 +0100 |
---|---|---|
committer | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2023-03-18 12:02:38 +0100 |
commit | 517f8e8aee5402ac67f4e09b0ff4d68cce8e601a (patch) | |
tree | dc4933fc2592e6ff0dca79404c82068c16ffab59 | |
parent | d797a8ccb2d0ea2e90b01b72e61cee3f248a343a (diff) | |
download | u-boot-517f8e8aee5402ac67f4e09b0ff4d68cce8e601a.zip u-boot-517f8e8aee5402ac67f4e09b0ff4d68cce8e601a.tar.gz u-boot-517f8e8aee5402ac67f4e09b0ff4d68cce8e601a.tar.bz2 |
pinctrl: renesas: Replace ifdeffery with IS_ENABLED()
Switch ifdef in sh_gpio_get_value() to IS_ENABLED() macro.
The CONFIG_RCAR_GEN3 will never have SPL counterpart, so
the IS_ENABLED() macro is the right one here. No functional
change, except for improved build test coverage.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
-rw-r--r-- | drivers/gpio/sh_pfc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/sh_pfc.c b/drivers/gpio/sh_pfc.c index 988f7e9..92522b6 100644 --- a/drivers/gpio/sh_pfc.c +++ b/drivers/gpio/sh_pfc.c @@ -568,10 +568,10 @@ static int sh_gpio_get_value(struct pinmux_info *gpioc, unsigned gpio) if (!gpioc || get_data_reg(gpioc, gpio, &dr, &bit) != 0) return -1; -#if defined(CONFIG_RCAR_GEN3) - if ((gpioc->gpios[gpio].flags & PINMUX_FLAG_TYPE) == PINMUX_TYPE_INPUT) + + if (IS_ENABLED(CONFIG_RCAR_GEN3) && + ((gpioc->gpios[gpio].flags & PINMUX_FLAG_TYPE) == PINMUX_TYPE_INPUT)) offset += 4; -#endif return gpio_read_bit(dr, offset, bit); } |