linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: mach-shmobile: Kill off unused !gpio_is_valid() case
@ 2011-01-12 10:43 Magnus Damm
  2011-01-13  6:20 ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2011-01-12 10:43 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@opensource.se>

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>
---

 arch/arm/mach-shmobile/board-ap4evb.c   |    5 +----
 arch/arm/mach-shmobile/board-mackerel.c |    5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

--- 0001/arch/arm/mach-shmobile/board-ap4evb.c
+++ work/arch/arm/mach-shmobile/board-ap4evb.c	2011-01-12 14:42:46.000000000 +0900
@@ -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 */
--- 0001/arch/arm/mach-shmobile/board-mackerel.c
+++ work/arch/arm/mach-shmobile/board-mackerel.c	2011-01-12 14:32:00.000000000 +0900
@@ -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 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: mach-shmobile: Kill off unused !gpio_is_valid() case
  2011-01-12 10:43 [PATCH] ARM: mach-shmobile: Kill off unused !gpio_is_valid() case Magnus Damm
@ 2011-01-13  6:20 ` Paul Mundt
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2011-01-13  6:20 UTC (permalink / raw)
  To: linux-sh

On Wed, Jan 12, 2011 at 07:43:07PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-13  6:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-12 10:43 [PATCH] ARM: mach-shmobile: Kill off unused !gpio_is_valid() case Magnus Damm
2011-01-13  6:20 ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).