From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp1040.oracle.com ([141.146.126.69]:16823 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753223Ab3HVM4R (ORCPT ); Thu, 22 Aug 2013 08:56:17 -0400 Date: Thu, 22 Aug 2013 15:56:13 +0300 From: Dan Carpenter Subject: [patch] mmc: omap_hsmmc: precedence bug in omap_hsmmc_context_restore() Message-ID: <20130822125613.GB2543@elgon.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: devicetree-owner@vger.kernel.org To: Balaji T K Cc: Chris Ball , Grant Likely , Rob Herring , linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, kernel-janitors@vger.kernel.org List-ID: '!' 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 --- 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) {