All of lore.kernel.org
 help / color / mirror / Atom feed
* s3cmci: convert missed s3c2410_gpio calls to gpiolib calls
@ 2009-11-10 17:15 ` Ben Dooks
  0 siblings, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2009-11-10 17:15 UTC (permalink / raw)
  To: akpm, linux-mmc; +Cc: linux-arm-kernel, Simtec Linux Team

[-- Attachment #1: simtec/ready/sdmmc-fix-missing-gpio-call.patch --]
[-- Type: text/plain, Size: 1187 bytes --]

Convert two missed s3c2410 specific gpio calls to gpiolib calls.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>

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

Index: b/drivers/mmc/host/s3cmci.c
===================================================================
--- a/drivers/mmc/host/s3cmci.c	2009-11-03 22:31:33.000000000 +0000
+++ b/drivers/mmc/host/s3cmci.c	2009-11-03 22:53:23.000000000 +0000
@@ -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 = gpio_get_value(pdata->gpio_wprotect) ? 1 : 0;
+	ret ^= pdata->wprotect_invert;
 
 	return ret;
 }
@@ -1654,7 +1652,7 @@ static int __devinit s3cmci_probe(struct
 			goto probe_free_irq;
 		}
 
-		host->irq_cd = s3c2410_gpio_getirq(host->pdata->gpio_detect);
+		host->irq_cd = gpio_to_irq(host->pdata->gpio_detect);
 
 		if (host->irq_cd >= 0) {
 			if (request_irq(host->irq_cd, s3cmci_irq_cd,

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

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

* s3cmci: convert missed s3c2410_gpio calls to gpiolib calls
@ 2009-11-10 17:15 ` Ben Dooks
  0 siblings, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2009-11-10 17:15 UTC (permalink / raw)
  To: linux-arm-kernel

An embedded and charset-unspecified text was scrubbed...
Name: simtec/ready/sdmmc-fix-missing-gpio-call.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091110/549373ac/attachment.el>

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

* s3cmci: convert missed s3c2410_gpio calls to gpiolib calls
  2009-11-03 22:50 Ben Dooks
@ 2009-11-03 22:54 ` Ben Dooks
  0 siblings, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2009-11-03 22:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 03, 2009 at 10:50:07PM +0000, Ben Dooks wrote:
> Convert two missed s3c2410 specific gpio calls to gpiolib calls.
> 
> Signed-off-by: Ben Dooks <ben@simtec.co.uk>
> Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
> 
> ---
>  drivers/mmc/host/s3cmci.c |    8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> Index: b/drivers/mmc/host/s3cmci.c
> ===================================================================
> --- a/drivers/mmc/host/s3cmci.c	2009-11-03 22:17:12.000000000 +0000
> +++ b/drivers/mmc/host/s3cmci.c	2009-11-03 22:22:33.000000000 +0000
> @@ -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.

-- 
Ben

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

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

* s3cmci: convert missed s3c2410_gpio calls to gpiolib calls
@ 2009-11-03 22:53 Ben Dooks
  0 siblings, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2009-11-03 22:53 UTC (permalink / raw)
  To: linux-arm-kernel

An embedded and charset-unspecified text was scrubbed...
Name: sdmmc-fix-missing-gpio-call.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091103/50ad19a9/attachment.el>

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

* s3cmci: convert missed s3c2410_gpio calls to gpiolib calls
@ 2009-11-03 22:50 Ben Dooks
  2009-11-03 22:54 ` Ben Dooks
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Dooks @ 2009-11-03 22:50 UTC (permalink / raw)
  To: linux-arm-kernel

An embedded and charset-unspecified text was scrubbed...
Name: sdmmc-fix-missing-gpio-call.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091103/2067033e/attachment.el>

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

end of thread, other threads:[~2009-11-10 17:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-10 17:15 s3cmci: convert missed s3c2410_gpio calls to gpiolib calls Ben Dooks
2009-11-10 17:15 ` Ben Dooks
  -- strict thread matches above, loose matches on Subject: below --
2009-11-03 22:53 Ben Dooks
2009-11-03 22:50 Ben Dooks
2009-11-03 22:54 ` Ben Dooks

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.