]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
[MIPS] Fix au1xxx_gpio_direction_* return value
authorYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Thu, 2 Aug 2007 03:48:00 +0000 (12:48 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 27 Aug 2007 01:16:50 +0000 (02:16 +0100)
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/au1000/common/gpio.c

index 7abe420994390461ffb9d059475f6e5fb7defcce..8527856aec45c2c36dff1a15b83ef2d12ca97571 100644 (file)
@@ -131,12 +131,12 @@ int au1xxx_gpio_direction_input(unsigned gpio)
 {
        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(unsigned gpio, int value)
 {
        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);