public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] MMCI: use _cansleep GPIO functions
@ 2010-09-09 20:31 Linus Walleij
  2010-09-11  5:37 ` Rabin Vincent
  0 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2010-09-09 20:31 UTC (permalink / raw)
  To: linux-arm-kernel

Currently the kernel is screaming about slowpath at me for the
wp/cd callbacks. Swicth to the _cansleep variants so as to silence
this. Also remove the double-negate in front of the cd GPIO read.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
---
 drivers/mmc/host/mmci.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index f0c7313..082abad 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -614,7 +614,7 @@ static int mmci_get_ro(struct mmc_host *mmc)
 	if (host->gpio_wp == -ENOSYS)
 		return -ENOSYS;
 
-	return gpio_get_value(host->gpio_wp);
+	return gpio_get_value_cansleep(host->gpio_wp);
 }
 
 static int mmci_get_cd(struct mmc_host *mmc)
@@ -629,7 +629,8 @@ static int mmci_get_cd(struct mmc_host *mmc)
 
 		status = plat->status(mmc_dev(host->mmc));
 	} else
-		status = !!gpio_get_value(host->gpio_cd) ^ plat->cd_invert;
+		status = gpio_get_value_cansleep(host->gpio_cd) ^
+			plat->cd_invert;
 
 	/*
 	 * Use positive logic throughout - status is zero for no card,
-- 
1.6.3.3

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

end of thread, other threads:[~2010-09-11 14:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-09 20:31 [PATCH] MMCI: use _cansleep GPIO functions Linus Walleij
2010-09-11  5:37 ` Rabin Vincent
2010-09-11 11:22   ` Linus Walleij
2010-09-11 11:31     ` Linus Walleij
2010-09-11 11:32     ` Russell King - ARM Linux
2010-09-11 11:39       ` Linus Walleij
2010-09-11 11:40         ` Russell King - ARM Linux
2010-09-11 14:08         ` Sergei Shtylyov
2010-09-11 14:11           ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox