Skip to contentSkip to conversation

s3cmci: convert missed s3c2410_gpio calls to gpiolib calls

DISCUSSION Ben Dooks 2 participants 2 messages Nov 3, 2009

lore
Share & tools
lore
#1 lore raw
Quoted 14 lines · Ben Dooks

Convert two missed s3c2410 specific gpio calls to gpiolib calls.

---
 drivers/mmc/host/s3cmci.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Index: b/drivers/mmc/host/s3cmci.c
===================================================================

drivers/mmc/host/s3cmci.c static int s3cmci_get_ro(struct mmc_host · line 1306

Quoted 9 lines
drivers/mmc/host/s3cmci.c +2 -4
@@ -1302,10 +1302,8 @@ static int s3cmci_get_ro(struct mmc_host
 	if (pdata->no_wprotect)
 		return 0;
 
-	ret = s3c2410_gpio_getpin(pdata->gpio_wprotect);
-
-	if (pdata->wprotect_invert)
-		ret = !ret;
+	ret = s3c2410_gpio_getpin(pdata->gpio_wprotect) ? 1 : 0;
+	ret ^= pdata->wprotect_invert;

gah, should have been gpio_get_value(), reposted.

Signature · 4 lines
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.