From patchwork Wed Jan 11 11:51:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 90857 Delivered-To: patches@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1081730qgi; Wed, 11 Jan 2017 03:51:56 -0800 (PST) X-Received: by 10.46.76.2 with SMTP id z2mr3231092lja.32.1484135516303; Wed, 11 Jan 2017 03:51:56 -0800 (PST) Return-Path: Received: from mail-lf0-x22e.google.com (mail-lf0-x22e.google.com. [2a00:1450:4010:c07::22e]) by mx.google.com with ESMTPS id v25si3368933lja.11.2017.01.11.03.51.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 03:51:56 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22e as permitted sender) client-ip=2a00:1450:4010:c07::22e; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22e as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x22e.google.com with SMTP id v186so80876866lfa.1 for ; Wed, 11 Jan 2017 03:51:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KOBY3JNVtK4zJLTEOWgMCzL43eB9nH5+LTDbgLdAxYw=; b=bQYI2yU51bjQ3xM+ADJWGrzofR3h3lQvyXbmNqEV4Ls0oKImOGf2Y0SD0SQzUHHLQS /E0TPzCMTrKLfWlRilA0lA9Y4e2Cjs2G/Uh5oP/1LbAfaPbVfJNDFc9xQgviNMSgFcM3 QH5dk3cuftVL4fwTCaITqzchhBlG5jrg/YTO0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KOBY3JNVtK4zJLTEOWgMCzL43eB9nH5+LTDbgLdAxYw=; b=L/QS+H1n1T2Oavj+gUTh5cVYDDKBF14eI4DyvBgYoIOv/Hvx70vNGTnNaYEyUHDBBk ftcdnEqRywFQJJ6L3m2lNN5B9vhWIVAFdeFoeUOnvmeTeujnLnVw4TZfX5UB2mM4VkMe u0S1vw528GK9kj9rsvloJIL/o/DifWrBdZFJMqBHikypSBXcij4XNURkgwQgykhHljBX 3o59LqTsSieb4CXhW3AuP6wGRtVBw+v+TkevJPbjHMl9seCGkjHRuFbdo26KBXfMhRuY fMDiqN8rDzYFa4aU8SoKZA3EcBDwJXegkPtFTCOYKfnDZYWHHYbVNJ/rcb0FCZfUGiSK VHsw== X-Gm-Message-State: AIkVDXLM6rM7fZ+0QQ+ylnoLAYAnhIAEdq+R6wqUMLAl+puiSyxXDpq/TmXqLzhfL/4BiooCHzc= X-Received: by 10.46.7.1 with SMTP id 1mr3276812ljh.76.1484135515875; Wed, 11 Jan 2017 03:51:55 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-155-4-221-67.na.cust.bahnhof.se. [155.4.221.67]) by smtp.gmail.com with ESMTPSA id 87sm958768lft.27.2017.01.11.03.51.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Jan 2017 03:51:54 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Linus Walleij , linux-omap@vger.kernel.org, Tony Lindgren , Jarkko Nikula Subject: [PATCH v2 08/12] mmc: omap: Don't use mmc_card_present() when validating for inserted card Date: Wed, 11 Jan 2017 12:51:14 +0100 Message-Id: <1484135478-2077-9-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484135478-2077-1-git-send-email-ulf.hansson@linaro.org> References: <1484135478-2077-1-git-send-email-ulf.hansson@linaro.org> The mmc_card_present() function helps the mmc core to track an internal state of the card device. More importantly, it's not intended to be used by mmc host drivers to check for an inserted card. Therefore, let's stop using it and instead rely on checking for a valid pointer to a struct mmc_card, as it should be good enough. Cc: linux-omap@vger.kernel.org Cc: Tony Lindgren Cc: Jarkko Nikula Signed-off-by: Ulf Hansson Acked-by: Tony Lindgren Reviewed-by: Linus Walleij --- drivers/mmc/host/omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index be3c49f..bd49f34 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -893,7 +893,7 @@ static void mmc_omap_cover_handler(unsigned long param) * If no card is inserted, we postpone polling until * the cover has been closed. */ - if (slot->mmc->card == NULL || !mmc_card_present(slot->mmc->card)) + if (slot->mmc->card == NULL) return; mod_timer(&slot->cover_timer,