소스 검색

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

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>
Magnus Damm 14 년 전
부모
커밋
ceb50f33d4
2개의 변경된 파일2개의 추가작업 그리고 8개의 파일을 삭제
  1. 1 4
      arch/arm/mach-shmobile/board-ap4evb.c
  2. 1 4
      arch/arm/mach-shmobile/board-mackerel.c

+ 1 - 4
arch/arm/mach-shmobile/board-ap4evb.c

@@ -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 */

+ 1 - 4
arch/arm/mach-shmobile/board-mackerel.c

@@ -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 */