[PATCH] bcma: gpio: use #if instead of "if" for IS_BUILTIN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Rafał Miłecki <zajec5@xxxxxxxxx>
---
 drivers/bcma/driver_gpio.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/bcma/driver_gpio.c b/drivers/bcma/driver_gpio.c
index 69c82e2..25f9887 100644
--- a/drivers/bcma/driver_gpio.c
+++ b/drivers/bcma/driver_gpio.c
@@ -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
-- 
1.7.10.4



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux