* [PATCH] bcma: gpio: use #if instead of "if" for IS_BUILTIN
@ 2014-01-14 14:26 Rafał Miłecki
0 siblings, 0 replies; only message in thread
From: Rafał Miłecki @ 2014-01-14 14:26 UTC (permalink / raw)
To: linux-mips, Ralf Baechle; +Cc: Hauke Mehrtens, Rafał Miłecki
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@gmail.com>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-01-14 14:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-14 14:26 [PATCH] bcma: gpio: use #if instead of "if" for IS_BUILTIN Rafał Miłecki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.