diff options
Diffstat (limited to 'arch/sh/kernel/gpio.c')
-rw-r--r-- | arch/sh/kernel/gpio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/sh/kernel/gpio.c b/arch/sh/kernel/gpio.c index bb8b812c6895..d37165361034 100644 --- a/arch/sh/kernel/gpio.c +++ b/arch/sh/kernel/gpio.c | |||
@@ -267,9 +267,13 @@ int pinmux_config_gpio(struct pinmux_info *gpioc, unsigned gpio, | |||
267 | break; | 267 | break; |
268 | 268 | ||
269 | in_range = enum_in_range(enum_id, &gpioc->function); | 269 | in_range = enum_in_range(enum_id, &gpioc->function); |
270 | if (!in_range && range) | 270 | if (!in_range && range) { |
271 | in_range = enum_in_range(enum_id, range); | 271 | in_range = enum_in_range(enum_id, range); |
272 | 272 | ||
273 | if (in_range && enum_id == range->force) | ||
274 | continue; | ||
275 | } | ||
276 | |||
273 | if (!in_range) | 277 | if (!in_range) |
274 | continue; | 278 | continue; |
275 | 279 | ||
@@ -432,7 +436,7 @@ static int __gpio_get_set_value(struct pinmux_info *gpioc, | |||
432 | BUG(); | 436 | BUG(); |
433 | else | 437 | else |
434 | value = read_write_reg(dr->reg, dr->reg_width, | 438 | value = read_write_reg(dr->reg, dr->reg_width, |
435 | 1, bit, value, do_write); | 439 | 1, bit, !!value, do_write); |
436 | 440 | ||
437 | return value; | 441 | return value; |
438 | } | 442 | } |