From patchwork Fri Nov 4 10:52:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Girish K S X-Patchwork-Id: 4936 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D5A9C23DC3 for ; Fri, 4 Nov 2011 10:53:06 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id CB2B1A180EE for ; Fri, 4 Nov 2011 10:53:06 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id n26so3627779faa.11 for ; Fri, 04 Nov 2011 03:53:06 -0700 (PDT) Received: by 10.152.105.67 with SMTP id gk3mr786179lab.48.1320403986588; Fri, 04 Nov 2011 03:53:06 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.14.103 with SMTP id o7cs120046lac; Fri, 4 Nov 2011 03:53:06 -0700 (PDT) Received: by 10.42.135.66 with SMTP id o2mr15172263ict.0.1320403984323; Fri, 04 Nov 2011 03:53:04 -0700 (PDT) Received: from mail-iy0-f178.google.com (mail-iy0-f178.google.com [209.85.210.178]) by mx.google.com with ESMTPS id ul9si7658226icb.43.2011.11.04.03.53.03 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Nov 2011 03:53:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of girish.shivananjappa@linaro.org) client-ip=209.85.210.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of girish.shivananjappa@linaro.org) smtp.mail=girish.shivananjappa@linaro.org Received: by iadj38 with SMTP id j38so3082410iad.37 for ; Fri, 04 Nov 2011 03:53:03 -0700 (PDT) Received: by 10.42.164.194 with SMTP id h2mr14514304icy.44.1320403983152; Fri, 04 Nov 2011 03:53:03 -0700 (PDT) Received: from girishks ([115.113.119.130]) by mx.google.com with ESMTPS id eh34sm19474053ibb.5.2011.11.04.03.52.59 (version=SSLv3 cipher=OTHER); Fri, 04 Nov 2011 03:53:02 -0700 (PDT) From: Girish K S To: linux-mmc@vger.kernel.org Cc: cjb@laptop.org, patches@linaro.org, linux-samsung-soc@vger.kernel.org, Girish K S Subject: [PATCH] mmc: core: Fix setting power notify state variable for non eMMC Date: Fri, 4 Nov 2011 16:22:47 +0530 Message-Id: <1320403967-2940-1-git-send-email-girish.shivananjappa@linaro.org> X-Mailer: git-send-email 1.7.1 This patch skips the setting of the power notify state variable for non eMMC 4.5 devices. Also fixes the problem of omap_hsmmc noisy/broken for suspend resume reported by kevin Hilman. cc: Chris Ball Signed-off-by: Girish K S Acked-by: Ulf Hansson --- drivers/mmc/core/mmc.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 3627044..4db73a9 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -882,10 +882,14 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, card->ext_csd.generic_cmd6_time); if (err && err != -EBADMSG) goto free_card; - } - if (!err) - card->poweroff_notify_state = MMC_POWERED_ON; + /* + * The err can be -EBADMSG or 0, + * so check for success and update the flag + */ + if (!err) + card->poweroff_notify_state = MMC_POWERED_ON; + } /* * Activate high speed (if supported)