linux-mips
[Top] [All Lists]

[PATCH][MIPS] fix au1xxx_gpio_direction_* return value

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH][MIPS] fix au1xxx_gpio_direction_* return value
From: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Date: Thu, 2 Aug 2007 12:48:00 +0900
Cc: yoichi_yuasa@tripeaks.co.jp, linux-mips <linux-mips@linux-mips.org>
Organization: TriPeaks Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Fix au1xxx_gpio_direction_* return value.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff 
mips-orig/arch/mips/au1000/common/gpio.c mips/arch/mips/au1000/common/gpio.c
--- mips-orig/arch/mips/au1000/common/gpio.c    2007-08-02 10:49:14.849705000 
+0900
+++ mips/arch/mips/au1000/common/gpio.c 2007-08-02 10:49:35.158974250 +0900
@@ -131,12 +131,12 @@ int au1xxx_gpio_direction_input(unsigned
 {
        if (gpio >= AU1XXX_GPIO_BASE)
 #if defined(CONFIG_SOC_AU1000)
-               ;
+               return -ENODEV;
 #else
                return au1xxx_gpio2_direction_input(gpio);
 #endif
-       else
-               return au1xxx_gpio1_direction_input(gpio);
+
+       return au1xxx_gpio1_direction_input(gpio);
 }
 
 EXPORT_SYMBOL(au1xxx_gpio_direction_input);
@@ -145,12 +145,12 @@ int au1xxx_gpio_direction_output(unsigne
 {
        if (gpio >= AU1XXX_GPIO_BASE)
 #if defined(CONFIG_SOC_AU1000)
-               ;
+               return -ENODEV;
 #else
                return au1xxx_gpio2_direction_output(gpio, value);
 #endif
-       else
-               return au1xxx_gpio1_direction_output(gpio, value);
+
+       return au1xxx_gpio1_direction_output(gpio, value);
 }
 
 EXPORT_SYMBOL(au1xxx_gpio_direction_output);

<Prev in Thread] Current Thread [Next in Thread>