linux-mips
[Top] [All Lists]

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

To: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH] bcma: gpio: use #if instead of "if" for IS_BUILTIN
From: Rafał Miłecki <zajec5@gmail.com>
Date: Tue, 14 Jan 2014 15:26:03 +0100
Cc: Hauke Mehrtens <hauke@hauke-m.de>, Rafał Miłecki <zajec5@gmail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=0OvY79EatubSKsKVbF5sQ5Vxk5iOgsfzGOrbgdf02oU=; b=MZhybmzVpXOzz2f1N0LUkF9CRzRabzVHshe8zdz/M3pqHBMiqJn7HrLqmYeKcDKOvW qiWH0JexnLD0Z8+GJ6KKhSCsDFYrYxtzc9Y0DG5y6NetrXunWKPwhDXjH/29HwIfUIxp x5VkKwWFwoSFRPZ04Bb4hchDWTjgNOqJfVVzqXhtiwnIPbdMnhrBXHvUnlYISySVh7Fd qC82I+2ZNg3uiqf4AlNsJG5PtNhfU1PVGTtMHf0yEMhQTRDURuhbBCrVHlOliQVIC7MI P9Rkp2vTMKpJZJqbLrTwNklxnvkMV+tGH48v8/HlA86hqyuZcs57dxcjJLoqjJrXg+pX FsOQ==
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] bcma: gpio: use #if instead of "if" for IS_BUILTIN, Rafał Miłecki <=