public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [patch omap-git] hsmmc: card detect irq bugfix
@ 2009-01-13 10:49 David Brownell
  0 siblings, 0 replies; only message in thread
From: David Brownell @ 2009-01-13 10:49 UTC (permalink / raw)
  To: linux-omap

From: David Brownell <dbrownell@users.sourceforge.net>

Work around lockdep issue when card detect IRQ handlers run in
thread context ... it forces IRQF_DISABLED, which prevents all
access to twl4030 card detect signals.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
With so many OMAP3 boards having only one MMC/SD slot, used
for rootfs by developers, it's no surprise this hasn't been
noticed before!

 drivers/mmc/host/omap_hsmmc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -568,6 +568,9 @@ static void mmc_omap_detect(struct work_
 {
 	struct mmc_omap_host *host = container_of(work, struct mmc_omap_host,
 						mmc_carddetect_work);
+	struct omap_mmc_slot_data *slot = &mmc_slot(host);
+
+	host->carddetect = slot->card_detect(slot->card_detect_irq);
 
 	sysfs_notify(&host->mmc->class_dev.kobj, NULL, "cover_switch");
 	mmc_omap_fclk_state(host, ON);
@@ -591,7 +594,6 @@ static irqreturn_t omap_mmc_cd_handler(i
 {
 	struct mmc_omap_host *host = (struct mmc_omap_host *)dev_id;
 
-	host->carddetect = mmc_slot(host).card_detect(irq);
 	schedule_work(&host->mmc_carddetect_work);
 
 	return IRQ_HANDLED;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-13 10:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-13 10:49 [patch omap-git] hsmmc: card detect irq bugfix David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox