Skip to contentSkip to conversation

bcma: gpio: use #if instead of "if" for IS_BUILTIN

PATCH New Rafał Miłecki 1 participant 1 message Jan 14, 2014

Subsystems (2)
lore
Share & tools
lore

Rafał Miłecki

author maintainer
#0 lore raw

PATCH 1/1 bcma: gpio: use #if instead of "if" for IS_BUILTIN

Standard "if" was evaluating to if (0) which still required conditional code to be correct. It is not, as bcma_gpio_to_irq is not defined.

---
 drivers/bcma/driver_gpio.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/bcma/driver_gpio.c +3 -2
index 69c82e2..25f9887 100644
@@ -215,8 +215,9 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
 	chip->set		= bcma_gpio_set_value;
 	chip->direction_input	= bcma_gpio_direction_input;
 	chip->direction_output	= bcma_gpio_direction_output;
-	if (IS_BUILTIN(CONFIG_BCMA_HOST_SOC))
-		chip->to_irq		= bcma_gpio_to_irq;
+#if IS_BUILTIN(CONFIG_BCMA_HOST_SOC)
+	chip->to_irq		= bcma_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
Signature · 1 line
1.7.10.4