From 57ca58220d878aa9d1cf41f165a555ba68db7f33 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 28 Nov 2008 20:46:09 +0100 Subject: [PATCH] --- yaml --- r: 130567 b: refs/heads/master c: 33763d571da995913299cd0509425decfa9e4be0 h: refs/heads/master i: 130565: 108c6c3ec30f68acbd37a8854cd1efd6ed63ab41 130563: 65a8ae6d53606b115baa847de5e29613637c2817 130559: 8813e85455b51189188fd60e81270afea0483bca v: v3 --- [refs] | 2 +- trunk/arch/mips/rb532/gpio.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index d2a2e189e6b6..318a4fbc80d5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4aa0f4d7264bc4f54603de5db1ffcaf8912ddd23 +refs/heads/master: 33763d571da995913299cd0509425decfa9e4be0 diff --git a/trunk/arch/mips/rb532/gpio.c b/trunk/arch/mips/rb532/gpio.c index e35cb75a3ae7..f5b15a17432f 100644 --- a/trunk/arch/mips/rb532/gpio.c +++ b/trunk/arch/mips/rb532/gpio.c @@ -169,8 +169,8 @@ static int rb532_gpio_direction_input(struct gpio_chip *chip, unsigned offset) gpch = container_of(chip, struct rb532_gpio_chip, chip); - if (rb532_get_bit(offset, gpch->regbase + GPIOFUNC)) - return 1; /* alternate function, GPIOCFG is ignored */ + /* disable alternate function in case it's set */ + rb532_set_bit(0, offset, gpch->regbase + GPIOFUNC); rb532_set_bit(0, offset, gpch->regbase + GPIOCFG); return 0; @@ -186,8 +186,8 @@ static int rb532_gpio_direction_output(struct gpio_chip *chip, gpch = container_of(chip, struct rb532_gpio_chip, chip); - if (rb532_get_bit(offset, gpch->regbase + GPIOFUNC)) - return 1; /* alternate function, GPIOCFG is ignored */ + /* disable alternate function in case it's set */ + rb532_set_bit(0, offset, gpch->regbase + GPIOFUNC); /* set the initial output value */ rb532_set_bit(value, offset, gpch->regbase + GPIOD);