ssb: gpio: use #if instead of "if" for IS_ENABLED
Subsystems (2)
PATCH 1/1 ssb: gpio: use #if instead of "if" for IS_ENABLED
Standard "if" was evaluating to if (0) which still required conditional code to be correct. It is not, as ssb_gpio_to_irq is not defined.
Signed-off-by Rafał Miłecki <[email protected]>
---
John: if you manage to, you should merge (bundle?) this one with
ssb: gpio: add own IRQ domain
(to avoid build breakage during bisection)
--- drivers/ssb/driver_gpio.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/ssb/driver_gpio.c +6 -4
@@ -230,8 +230,9 @@ static int ssb_gpio_chipco_init(struct ssb_bus *bus) chip->set = ssb_gpio_chipco_set_value; chip->direction_input = ssb_gpio_chipco_direction_input; chip->direction_output = ssb_gpio_chipco_direction_output; -if (IS_ENABLED (CONFIG_SSB_EMBEDDED )) - chip->to_irq = ssb_gpio_to_irq; +#if IS_ENABLED (CONFIG_SSB_EMBEDDED ) + chip->to_irq = ssb_gpio_to_irq; +#endif chip->ngpio =16 ;/* There is just one SoC in one device and its GPIO addresses should be * deterministic to address them more easily. The other buses could get
@@ -422,8 +423,9 @@ static int ssb_gpio_extif_init(struct ssb_bus *bus) chip->set = ssb_gpio_extif_set_value; chip->direction_input = ssb_gpio_extif_direction_input; chip->direction_output = ssb_gpio_extif_direction_output; -if (IS_ENABLED (CONFIG_SSB_EMBEDDED )) - chip->to_irq = ssb_gpio_to_irq; +#if IS_ENABLED (CONFIG_SSB_EMBEDDED ) + chip->to_irq = ssb_gpio_to_irq; +#endif chip->ngpio =5 ;/* There is just one SoC in one device and its GPIO addresses should be * deterministic to address them more easily. The other buses could get
Signature · 1 line
1.7.10.4