Browse Source

[MIPS] Fix au1xxx_gpio_direction_* return value

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Yoichi Yuasa 18 years ago
parent
commit
7acae224a4
1 changed files with 6 additions and 6 deletions
  1. 6 6
      arch/mips/au1000/common/gpio.c

+ 6 - 6
arch/mips/au1000/common/gpio.c

@@ -131,12 +131,12 @@ int au1xxx_gpio_direction_input(unsigned gpio)
 {
 {
 	if (gpio >= AU1XXX_GPIO_BASE)
 	if (gpio >= AU1XXX_GPIO_BASE)
 #if defined(CONFIG_SOC_AU1000)
 #if defined(CONFIG_SOC_AU1000)
-		;
+		return -ENODEV;
 #else
 #else
 		return au1xxx_gpio2_direction_input(gpio);
 		return au1xxx_gpio2_direction_input(gpio);
 #endif
 #endif
-	else
-		return au1xxx_gpio1_direction_input(gpio);
+
+	return au1xxx_gpio1_direction_input(gpio);
 }
 }
 
 
 EXPORT_SYMBOL(au1xxx_gpio_direction_input);
 EXPORT_SYMBOL(au1xxx_gpio_direction_input);
@@ -145,12 +145,12 @@ int au1xxx_gpio_direction_output(unsigned gpio, int value)
 {
 {
 	if (gpio >= AU1XXX_GPIO_BASE)
 	if (gpio >= AU1XXX_GPIO_BASE)
 #if defined(CONFIG_SOC_AU1000)
 #if defined(CONFIG_SOC_AU1000)
-		;
+		return -ENODEV;
 #else
 #else
 		return au1xxx_gpio2_direction_output(gpio, value);
 		return au1xxx_gpio2_direction_output(gpio, value);
 #endif
 #endif
-	else
-		return au1xxx_gpio1_direction_output(gpio, value);
+
+	return au1xxx_gpio1_direction_output(gpio, value);
 }
 }
 
 
 EXPORT_SYMBOL(au1xxx_gpio_direction_output);
 EXPORT_SYMBOL(au1xxx_gpio_direction_output);