[RFC PATCH 1/7] gpio: of: use the BIT macro for of_gpio_flags

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

 



Use the BIT macro for the of_gpio_flags enumeration.

Signed-off-by: Ludovic Desroches <ludovic.desroches@xxxxxxxxxxxxx>
---
 include/linux/of_gpio.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index 18a7f03e1182..f928c2df2bcd 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -14,6 +14,7 @@
 #ifndef __LINUX_OF_GPIO_H
 #define __LINUX_OF_GPIO_H
 
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -28,10 +29,10 @@ struct device_node;
  * Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended.
  */
 enum of_gpio_flags {
-	OF_GPIO_ACTIVE_LOW = 0x1,
-	OF_GPIO_SINGLE_ENDED = 0x2,
-	OF_GPIO_OPEN_DRAIN = 0x4,
-	OF_GPIO_TRANSITORY = 0x8,
+	OF_GPIO_ACTIVE_LOW	= BIT(0),
+	OF_GPIO_SINGLE_ENDED	= BIT(1),
+	OF_GPIO_OPEN_DRAIN	= BIT(2),
+	OF_GPIO_TRANSITORY	= BIT(3),
 };
 
 #ifdef CONFIG_OF_GPIO
-- 
2.12.2

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux