devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] mmc: omap_hsmmc: precedence bug in omap_hsmmc_context_restore()
@ 2013-08-22 12:56 Dan Carpenter
  2013-08-22 14:46 ` Balaji T K
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2013-08-22 12:56 UTC (permalink / raw)
  To: Balaji T K
  Cc: Chris Ball, Grant Likely, Rob Herring, linux-mmc, linux-omap,
	devicetree, kernel-janitors

'!' has higher precedence than '&' so this doesn't work as intended
although since RESETDONE is 1 it would work if none of the other bits
are set.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Untested.

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 1865321..7346b15 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -612,7 +612,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host)
 	if (host->context_loss == context_loss)
 		return 1;
 
-	if (!OMAP_HSMMC_READ(host->base, SYSSTATUS) & RESETDONE)
+	if (!(OMAP_HSMMC_READ(host->base, SYSSTATUS) & RESETDONE))
 		return 1;
 
 	if (host->pdata->controller_flags & OMAP_HSMMC_SUPPORTS_DUAL_VOLT) {

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

end of thread, other threads:[~2014-01-30 13:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22 12:56 [patch] mmc: omap_hsmmc: precedence bug in omap_hsmmc_context_restore() Dan Carpenter
2013-08-22 14:46 ` Balaji T K
2014-01-30 12:15   ` Dan Carpenter
2014-01-30 13:04     ` Balaji T K

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