linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] mmc: at91_mci: remove the use of irq_to_gpio
@ 2011-08-04 15:49 Nicolas Ferre
  2011-08-04 16:47 ` Sergei Shtylyov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nicolas Ferre @ 2011-08-04 15:49 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the use of irq_to_gpio() in the card detection interrupt
handler. The information is available in the board structure and
we can avoid using a function that has little meaning.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
Ben, Arnd,

I have identified this use of irq_to_gpio() which can be remove immediatly.

 drivers/mmc/host/at91_mci.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index a4aa3af..351951c 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -869,7 +869,10 @@ static irqreturn_t at91_mci_irq(int irq, void *devid)
 static irqreturn_t at91_mmc_det_irq(int irq, void *_host)
 {
 	struct at91mci_host *host = _host;
-	int present = !gpio_get_value(irq_to_gpio(irq));
+	int present;
+
+	/* if we are here is that the det_pin exists */
+	present = !gpio_get_value(host->board->det_pin);
 
 	/*
 	 * we expect this irq on both insert and remove,
-- 
1.7.4.1

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

* [RFC PATCH] mmc: at91_mci: remove the use of irq_to_gpio
  2011-08-04 15:49 [RFC PATCH] mmc: at91_mci: remove the use of irq_to_gpio Nicolas Ferre
@ 2011-08-04 16:47 ` Sergei Shtylyov
  2011-08-05  8:58 ` Ben Dooks
  2011-08-05 15:18 ` Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2011-08-04 16:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

Nicolas Ferre wrote:

> Remove the use of irq_to_gpio() in the card detection interrupt
> handler. The information is available in the board structure and
> we can avoid using a function that has little meaning.

> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> Ben, Arnd,

> I have identified this use of irq_to_gpio() which can be remove immediatly.

>  drivers/mmc/host/at91_mci.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)

> diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
> index a4aa3af..351951c 100644
> --- a/drivers/mmc/host/at91_mci.c
> +++ b/drivers/mmc/host/at91_mci.c
> @@ -869,7 +869,10 @@ static irqreturn_t at91_mci_irq(int irq, void *devid)
>  static irqreturn_t at91_mmc_det_irq(int irq, void *_host)
>  {
>  	struct at91mci_host *host = _host;
> -	int present = !gpio_get_value(irq_to_gpio(irq));
> +	int present;
> +
> +	/* if we are here is that the det_pin exists */

    Hm, this comment doesn't parse...

> +	present = !gpio_get_value(host->board->det_pin);

WBR, Sergei

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

* [RFC PATCH] mmc: at91_mci: remove the use of irq_to_gpio
  2011-08-04 15:49 [RFC PATCH] mmc: at91_mci: remove the use of irq_to_gpio Nicolas Ferre
  2011-08-04 16:47 ` Sergei Shtylyov
@ 2011-08-05  8:58 ` Ben Dooks
  2011-08-05 15:18 ` Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2011-08-05  8:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Aug 04, 2011 at 04:49:03PM +0100, Nicolas Ferre wrote:
> Remove the use of irq_to_gpio() in the card detection interrupt
> handler. The information is available in the board structure and
> we can avoid using a function that has little meaning.

thanks, looks good.
 
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> Ben, Arnd,
> 
> I have identified this use of irq_to_gpio() which can be remove immediatly.
> 
>  drivers/mmc/host/at91_mci.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
> index a4aa3af..351951c 100644
> --- a/drivers/mmc/host/at91_mci.c
> +++ b/drivers/mmc/host/at91_mci.c
> @@ -869,7 +869,10 @@ static irqreturn_t at91_mci_irq(int irq, void *devid)
>  static irqreturn_t at91_mmc_det_irq(int irq, void *_host)
>  {
>  	struct at91mci_host *host = _host;
> -	int present = !gpio_get_value(irq_to_gpio(irq));
> +	int present;
> +
> +	/* if we are here is that the det_pin exists */
> +	present = !gpio_get_value(host->board->det_pin);
>  
>  	/*
>  	 * we expect this irq on both insert and remove,
> -- 
> 1.7.4.1
> 

-- 
Ben Dooks, ben at fluff.org, http://www.fluff.org/ben/

Large Hadron Colada: A large Pina Colada that makes the universe disappear.

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

* [RFC PATCH] mmc: at91_mci: remove the use of irq_to_gpio
  2011-08-04 15:49 [RFC PATCH] mmc: at91_mci: remove the use of irq_to_gpio Nicolas Ferre
  2011-08-04 16:47 ` Sergei Shtylyov
  2011-08-05  8:58 ` Ben Dooks
@ 2011-08-05 15:18 ` Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 0 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-08-05 15:18 UTC (permalink / raw)
  To: linux-arm-kernel

On 16:49 Thu 04 Aug     , Nicolas Ferre wrote:
> Remove the use of irq_to_gpio() in the card detection interrupt
> handler. The information is available in the board structure and
> we can avoid using a function that has little meaning.
> 
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Best Regards,
J.

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

end of thread, other threads:[~2011-08-05 15:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-04 15:49 [RFC PATCH] mmc: at91_mci: remove the use of irq_to_gpio Nicolas Ferre
2011-08-04 16:47 ` Sergei Shtylyov
2011-08-05  8:58 ` Ben Dooks
2011-08-05 15:18 ` Jean-Christophe PLAGNIOL-VILLARD

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