mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-09-21 07:01:57 +00:00
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>
This commit is contained in:
parent
d797a8ccb2
commit
517f8e8aee
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
if (!gpioc || get_data_reg(gpioc, gpio, &dr, &bit) != 0)
|
||||||
return -1;
|
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;
|
offset += 4;
|
||||||
#endif
|
|
||||||
|
|
||||||
return gpio_read_bit(dr, offset, bit);
|
return gpio_read_bit(dr, offset, bit);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue