From: Jaehoon Chung <jh80.chung@samsung.com>
To: linux-mmc <linux-mmc@vger.kernel.org>
Cc: Chris Ball <cjb@laptop.org>,
Kyungmin Park <kyungmin.park@samsung.com>,
Will Newton <will.newton@imgtec.com>,
James Hogan <James.Hogan@imgtec.com>,
Thomas Abraham <thomas.abraham@linaro.org>,
Seungwon Jeon <tgih.jun@samsung.com>
Subject: [PATCH v2 5/5] mmc: dw-mmc: fix the present flags for card detect
Date: Tue, 28 Aug 2012 16:55:45 +0900 [thread overview]
Message-ID: <503C7981.5050209@samsung.com> (raw)
dw_mci_get_cd() is registered to call-back function.
If call host->ops->get_cd(), host didn't set any card present flag.
Then host didn't know whether card is present or not.
This patch fixed them.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Singed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/mmc/host/dw_mmc.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 3642455..8a87d38 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -909,10 +909,13 @@ static int dw_mci_get_cd(struct mmc_host *mmc)
present = (mci_readl(slot->host, CDETECT) & (1 << slot->id))
== 0 ? 1 : 0;
- if (present)
+ if (present) {
+ set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
dev_dbg(&mmc->class_dev, "card is present\n");
- else
+ } else {
+ clear_bit(DW_MMC_CARD_PRESENT, &slot->flags);
dev_dbg(&mmc->class_dev, "card is not present\n");
+ }
return present;
}
--
1.7.4.1
next reply other threads:[~2012-08-28 7:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 7:55 Jaehoon Chung [this message]
2012-08-28 14:04 ` [PATCH v2 5/5] mmc: dw-mmc: fix the present flags for card detect Thomas Abraham
2012-08-29 1:51 ` Jaehoon Chung
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=503C7981.5050209@samsung.com \
--to=jh80.chung@samsung.com \
--cc=James.Hogan@imgtec.com \
--cc=cjb@laptop.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=tgih.jun@samsung.com \
--cc=thomas.abraham@linaro.org \
--cc=will.newton@imgtec.com \
/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