]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: mach-shmobile: Kill off unused !gpio_is_valid() case
authorMagnus Damm <damm@opensource.se>
Wed, 12 Jan 2011 10:43:07 +0000 (10:43 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 13 Jan 2011 06:22:04 +0000 (15:22 +0900)
The Card Detect GPIOs used on AP4EVB and Mackerel are
alwayws valid, so kill off the unused !gpio_is_valid()
case.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/arm/mach-shmobile/board-ap4evb.c
arch/arm/mach-shmobile/board-mackerel.c

index f888d9d1d0108b8d321f5d83c282055a33ef93d0..712e4331828626fe236cc8140499c9ce93858adf 100644 (file)
@@ -247,10 +247,7 @@ static struct platform_device smc911x_device = {
  */
 static int slot_cn7_get_cd(struct platform_device *pdev)
 {
-       if (gpio_is_valid(GPIO_PORT41))
-               return !gpio_get_value(GPIO_PORT41);
-       else
-               return -ENXIO;
+       return !gpio_get_value(GPIO_PORT41);
 }
 
 /* SH_MMCIF */
index ad7e14aba164faefd87d5384551361bcc34ca003..7b15d21f0f68b473fc7e8d87a859effdece7670d 100644 (file)
@@ -657,10 +657,7 @@ static struct platform_device fsi_ak4643_device = {
  */
 static int slot_cn7_get_cd(struct platform_device *pdev)
 {
-       if (gpio_is_valid(GPIO_PORT41))
-               return !gpio_get_value(GPIO_PORT41);
-       else
-               return -ENXIO;
+       return !gpio_get_value(GPIO_PORT41);
 }
 
 /* SDHI0 */