Skip to contentSkip to conversation

ARM: mach-shmobile: Kill off unused !gpio_is_valid() case

PATCH Applied Magnus Damm 2 participants 2 messages Jan 12, 2011 – Jan 13, 2011

Subsystems (4)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

PATCH 1/1 ARM: mach-shmobile: Kill off unused !gpio_is_valid() case

From: Magnus Damm <[email protected]>

The Card Detect GPIOs used on AP4EVB and Mackerel are alwayws valid, so kill off the unused !gpio_is_valid() case.

---

 arch/arm/mach-shmobile/board-ap4evb.c   |    5 +----
 arch/arm/mach-shmobile/board-mackerel.c |    5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)
arch/arm/mach-shmobile/board-ap4evb.c +1 -4
@@ -247,10 +247,7 @@ static struct platform_device smc911x_de
  */
 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 */
arch/arm/mach-shmobile/board-mackerel.c +1 -4
@@ -657,10 +657,7 @@ static struct platform_device fsi_ak4643
  */
 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 */