[PATCH] ssb: gpio: use #if instead of "if" for IS_ENABLED

[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 ssb_gpio_to_irq is not defined.

Signed-off-by: Rafał Miłecki <zajec5@xxxxxxxxx>
---
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(-)

diff --git a/drivers/ssb/driver_gpio.c b/drivers/ssb/driver_gpio.c
index 6c5a97d..ba350d2 100644
--- a/drivers/ssb/driver_gpio.c
+++ b/drivers/ssb/driver_gpio.c
@@ -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
-- 
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