[PATCH linux dev-4.7 06/14] gpio: aspeed: Remove dependence on GPIOF_* macros

Andrew Jeffery andrew at aj.id.au
Fri Feb 3 15:20:05 AEDT 2017


commit 1736f75d35e4 ("gpio: aspeed: Add banks Y, Z, AA, AB and AC") is a
(v2) patch which had unresolved review comments[1]. Address the comments
by removing the use of macros from the consumer header (this patch
represents the diff between v2 and v3[2]).

[1] https://lkml.org/lkml/2017/1/26/337
[2] https://lkml.org/lkml/2017/1/26/786

Applied with a commit message tweak from: https://patchwork.kernel.org/patch/9550977/

Fixes: 1736f75d35e4 ("gpio: aspeed: Add banks Y, Z, AA, AB and AC")
Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
---
 drivers/gpio/gpio-aspeed.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
index cb37783ff857..b855c948090f 100644
--- a/drivers/gpio/gpio-aspeed.c
+++ b/drivers/gpio/gpio-aspeed.c
@@ -15,7 +15,6 @@
 #include <linux/io.h>
 #include <linux/spinlock.h>
 #include <linux/platform_device.h>
-#include <linux/gpio.h>
 #include <linux/gpio/driver.h>
 #include <linux/pinctrl/consumer.h>
 
@@ -259,10 +258,10 @@ static int aspeed_gpio_get_direction(struct gpio_chip *gc, unsigned int offset)
 	u32 val;
 
 	if (!have_input(gpio, offset))
-		return GPIOF_DIR_OUT;
+		return 0;
 
 	if (!have_output(gpio, offset))
-		return GPIOF_DIR_IN;
+		return 1;
 
 	spin_lock_irqsave(&gpio->lock, flags);
 
-- 
2.9.3



More information about the openbmc mailing list