[PATCH] ARM: i.MX: Add missing braces

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

 



Add braces around the definition of imx1_gpio_val and imx31_gpio_val
to make sure it's evaluated correctly.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 arch/arm/mach-imx/include/mach/imx-gpio.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/include/mach/imx-gpio.h b/arch/arm/mach-imx/include/mach/imx-gpio.h
index 0cfd16f4fa..b9a6acc013 100644
--- a/arch/arm/mach-imx/include/mach/imx-gpio.h
+++ b/arch/arm/mach-imx/include/mach/imx-gpio.h
@@ -72,11 +72,11 @@ static inline void imx31_gpio_direction_input(void *base, int gpio)
 #define imx6_gpio_direction_input(base, gpio) imx31_gpio_direction_input(base, gpio)
 #define imx8m_gpio_direction_input(base, gpio) imx31_gpio_direction_input(base, gpio)
 
-#define imx1_gpio_val(base, gpio) readl(base + 0x1c) & (1 << gpio) ? 1 : 0
+#define imx1_gpio_val(base, gpio) (readl(base + 0x1c) & (1 << gpio) ? 1 : 0)
 #define imx21_gpio_val(base, gpio) imx1_gpio_val(base, gpio)
 #define imx27_gpio_val(base, gpio) imx1_gpio_val(base, gpio)
 
-#define imx31_gpio_val(base, gpio) readl(base) & (1 << gpio) ? 1 : 0
+#define imx31_gpio_val(base, gpio) (readl(base) & (1 << gpio) ? 1 : 0)
 #define imx25_gpio_val(base, gpio) imx31_gpio_val(base, gpio)
 #define imx35_gpio_val(base, gpio) imx31_gpio_val(base, gpio)
 #define imx51_gpio_val(base, gpio) imx31_gpio_val(base, gpio)
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux