public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Jaehoon Chung <jh80.chung@samsung.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	'Chris Ball' <cjb@laptop.org>,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH 4/4] mmc: sdhci-s3c: remove the duplicated calling sequence
Date: Tue, 25 Jun 2013 21:55:57 +0200	[thread overview]
Message-ID: <201306252155.58225.heiko@sntech.de> (raw)
In-Reply-To: <51C8F07B.5080205@samsung.com>

Am Dienstag, 25. Juni 2013, 03:20:59 schrieb Jaehoon Chung:
> Didn't need to call the sdhci_s3c_notify_change in
> setup_card_detect_gpio().
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Kyungmin Park <Kyungmin.park@samsung.com>


with the issue below addressed:

Acked-by: Heiko Stuebner <heiko@sntech.de>

and on a s3c2416
Tested-by: Heiko Stuebner <heiko@sntech.de>


> ---
>  drivers/mmc/host/sdhci-s3c.c |   26 ++++++++++++--------------
>  1 file changed, 12 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index f1d5965..64defad 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -409,20 +409,18 @@ static void sdhci_s3c_setup_card_detect_gpio(struct
> sdhci_s3c *sc) if (devm_gpio_request(dev, pdata->ext_cd_gpio, "SDHCI EXT
> CD") == 0) { sc->ext_cd_gpio = pdata->ext_cd_gpio;
>  		sc->ext_cd_irq = gpio_to_irq(pdata->ext_cd_gpio);
> -		if (sc->ext_cd_irq &&
> -		    request_threaded_irq(sc->ext_cd_irq, NULL,
> -					 sdhci_s3c_gpio_card_detect_thread,
> -					 IRQF_TRIGGER_RISING |
> -					 IRQF_TRIGGER_FALLING |
> -					 IRQF_ONESHOT,
> -					 dev_name(dev), sc) == 0) {
> -			int status = gpio_get_value(sc->ext_cd_gpio);
> -			if (pdata->ext_cd_gpio_invert)
> -				status = !status;
> -			sdhci_s3c_notify_change(sc->pdev, status);
> -		} else {
> -			dev_warn(dev, "cannot request irq for card detect\n");
> -			sc->ext_cd_irq = 0;
> +		if (sc->ext_cd_irq) {
> +			ret = request_threaded_irq(sc->ext_cd_irq, NULL,

when testing on linux-next from 20130624 I get a
ret undeclared here.

> +					sdhci_s3c_gpio_card_detect_thread,
> +					IRQF_TRIGGER_RISING |
> +					IRQF_TRIGGER_FALLING |
> +					IRQF_ONESHOT,
> +					dev_name(dev), sc);
> +			if (ret) {
> +				dev_warn(dev,
> +					"cannot request irq for card detect\n");
> +				sc->ext_cd_irq = 0;
> +			}
>  		}
>  	} else {
>  		dev_err(dev, "cannot request gpio for card detect\n");


      reply	other threads:[~2013-06-25 19:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25  1:20 [PATCH 4/4] mmc: sdhci-s3c: remove the duplicated calling sequence Jaehoon Chung
2013-06-25 19:55 ` Heiko Stübner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201306252155.58225.heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=cjb@laptop.org \
    --cc=jh80.chung@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox