diff options
Diffstat (limited to 'drivers/gpio/gpio-mockup.c')
-rw-r--r-- | drivers/gpio/gpio-mockup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-mockup.c b/drivers/gpio/gpio-mockup.c index 8269cffc2967..6a50f9f59c90 100644 --- a/drivers/gpio/gpio-mockup.c +++ b/drivers/gpio/gpio-mockup.c | |||
@@ -35,8 +35,8 @@ | |||
35 | #define gpio_mockup_err(...) pr_err(GPIO_MOCKUP_NAME ": " __VA_ARGS__) | 35 | #define gpio_mockup_err(...) pr_err(GPIO_MOCKUP_NAME ": " __VA_ARGS__) |
36 | 36 | ||
37 | enum { | 37 | enum { |
38 | GPIO_MOCKUP_DIR_OUT = 0, | 38 | GPIO_MOCKUP_DIR_IN = 0, |
39 | GPIO_MOCKUP_DIR_IN = 1, | 39 | GPIO_MOCKUP_DIR_OUT = 1, |
40 | }; | 40 | }; |
41 | 41 | ||
42 | /* | 42 | /* |
@@ -131,7 +131,7 @@ static int gpio_mockup_get_direction(struct gpio_chip *gc, unsigned int offset) | |||
131 | { | 131 | { |
132 | struct gpio_mockup_chip *chip = gpiochip_get_data(gc); | 132 | struct gpio_mockup_chip *chip = gpiochip_get_data(gc); |
133 | 133 | ||
134 | return chip->lines[offset].dir; | 134 | return !chip->lines[offset].dir; |
135 | } | 135 | } |
136 | 136 | ||
137 | static int gpio_mockup_to_irq(struct gpio_chip *gc, unsigned int offset) | 137 | static int gpio_mockup_to_irq(struct gpio_chip *gc, unsigned int offset) |