* [PATCH v2 4/4] mmc: sdhci-s3c: remove the duplicated calling sequence
@ 2013-08-02 14:09 Jaehoon Chung
2013-08-30 1:37 ` Chris Ball
0 siblings, 1 reply; 3+ messages in thread
From: Jaehoon Chung @ 2013-08-02 14:09 UTC (permalink / raw)
To: linux-mmc@vger.kernel.org
Cc: 'Chris Ball', Kyungmin Park, Heiko Stübner
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>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
---
Changelog v2:
- Added acked/tested by Heiko (on s3c2416)
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 f974778..c4ea802 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,
+ 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");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 4/4] mmc: sdhci-s3c: remove the duplicated calling sequence
2013-08-02 14:09 [PATCH v2 4/4] mmc: sdhci-s3c: remove the duplicated calling sequence Jaehoon Chung
@ 2013-08-30 1:37 ` Chris Ball
2013-08-30 3:01 ` Jaehoon Chung
0 siblings, 1 reply; 3+ messages in thread
From: Chris Ball @ 2013-08-30 1:37 UTC (permalink / raw)
To: Jaehoon Chung
Cc: linux-mmc@vger.kernel.org, Kyungmin Park, Heiko Stübner
Hi,
On Fri, Aug 02 2013, Jaehoon Chung wrote:
> 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>
> Acked-by: Heiko Stuebner <heiko@sntech.de>
> Tested-by: Heiko Stuebner <heiko@sntech.de>
> ---
> Changelog v2:
> - Added acked/tested by Heiko (on s3c2416)
>
> 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 f974778..c4ea802 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,
> + 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");
Jaehoon, this is really bad. Heiko's ACK was conditional on fixing
the error below:
/home/cjb/git/mmc/drivers/mmc/host/sdhci-s3c.c: In function ‘sdhci_s3c_setup_card_detect_gpio’:
/home/cjb/git/mmc/drivers/mmc/host/sdhci-s3c.c:422:4: error: ‘ret’ undeclared (first use in this function)
But you reposted the same patch with his ACK and no fix.
I don't mind the part where you probably didn't read his email
carefully -- I'm much more concerned that you've now submitted a
patch to me twice that you've apparently never compiled yourself.
I need you to compile and test all of the patches you send me.
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 4/4] mmc: sdhci-s3c: remove the duplicated calling sequence
2013-08-30 1:37 ` Chris Ball
@ 2013-08-30 3:01 ` Jaehoon Chung
0 siblings, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2013-08-30 3:01 UTC (permalink / raw)
To: Chris Ball
Cc: Jaehoon Chung, linux-mmc@vger.kernel.org, Kyungmin Park,
Heiko Stübner
Dear Chris.
On 08/30/2013 10:37 AM, Chris Ball wrote:
> Hi,
>
> On Fri, Aug 02 2013, Jaehoon Chung wrote:
>> 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>
>> Acked-by: Heiko Stuebner <heiko@sntech.de>
>> Tested-by: Heiko Stuebner <heiko@sntech.de>
>> ---
>> Changelog v2:
>> - Added acked/tested by Heiko (on s3c2416)
>>
>> 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 f974778..c4ea802 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,
>> + 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");
>
> Jaehoon, this is really bad. Heiko's ACK was conditional on fixing
> the error below:
>
> /home/cjb/git/mmc/drivers/mmc/host/sdhci-s3c.c: In function ‘sdhci_s3c_setup_card_detect_gpio’:
> /home/cjb/git/mmc/drivers/mmc/host/sdhci-s3c.c:422:4: error: ‘ret’ undeclared (first use in this function)
>
> But you reposted the same patch with his ACK and no fix.
Sorry.. I will check this.
>
> I don't mind the part where you probably didn't read his email
> carefully -- I'm much more concerned that you've now submitted a
> patch to me twice that you've apparently never compiled yourself.
> I need you to compile and test all of the patches you send me.
Ok..It's my mistake..
Best Regards,
Jaehoon Chung
>
> Thanks,
>
> - Chris.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-30 3:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-02 14:09 [PATCH v2 4/4] mmc: sdhci-s3c: remove the duplicated calling sequence Jaehoon Chung
2013-08-30 1:37 ` Chris Ball
2013-08-30 3:01 ` Jaehoon Chung
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).