From patchwork Fri Dec 30 12:47:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 89351 Delivered-To: patches@linaro.org Received: by 10.140.20.101 with SMTP id 92csp6424824qgi; Fri, 30 Dec 2016 04:48:36 -0800 (PST) X-Received: by 10.25.159.66 with SMTP id i63mr17483542lfe.73.1483102116685; Fri, 30 Dec 2016 04:48:36 -0800 (PST) Return-Path: Received: from mail-lf0-x22c.google.com (mail-lf0-x22c.google.com. [2a00:1450:4010:c07::22c]) by mx.google.com with ESMTPS id r136si33039949lff.91.2016.12.30.04.48.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Dec 2016 04:48:36 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22c as permitted sender) client-ip=2a00:1450:4010:c07::22c; 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::22c as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x22c.google.com with SMTP id y21so236383669lfa.1 for ; Fri, 30 Dec 2016 04:48:36 -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=7bU0OOOpRa92tBRgdd/FDAhfi9d0MOFTDlx3S2WeFdk=; b=QmxziGF0ILBXnB1yQtC0ou9zgXSPDSfMRlkIn+bT8y2NDhDbfF6tbQ6gp3im0oev3A St2cCOTLdzPvwXdfVqZd+VT2X2Atr9bf2laWSBX8OLPwlOqFHzd+8Dy69UfN6jLYCyKN ZT/I/w7yV5sdDQdPqFT77Z+Pqlh9r0jrYfbDc= 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=7bU0OOOpRa92tBRgdd/FDAhfi9d0MOFTDlx3S2WeFdk=; b=OwDNdrqHUIpZ4mVuaG7MCSq3ijdrY7PJ3AJtkp02F8LGN5rM3pKVkMCC8bFP3AUbb9 +YkaINnNiC7PPMhi/Gl4xRFZvNqyC0HUl6OELAiABYtLTKcieToqLRUv2QRGlcf3aetM g8+HLq5UkCak8firC0imwSAchiqR9+ltKSVESV+LmEb+RLxNiJlEiro5ifBS1gEAlme+ KjhqWh7idAhtMg4GB35ru6uUc0zJWDvWyaqik2A252mE1tLC4yXDgXCN09qJlAoYhFvz EVc6ZSEisBN3YAglzBgVC9uwSEqf0eIUTl3nTARaLgyRyuEuiyQ3RViqIGGe7Wx4ijj4 IfqA== X-Gm-Message-State: AIkVDXJhTq7a09S+0Qyil7ekUNfAaYv8QFibU//6y2xHp8UDa6KA8oDOc//l7N4K7NkbGTHAfJg= X-Received: by 10.46.8.25 with SMTP id 25mr17118930lji.21.1483102116269; Fri, 30 Dec 2016 04:48:36 -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 a79sm7450069ljb.46.2016.12.30.04.48.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Dec 2016 04:48:34 -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 17/21] mmc: omap: Don't use mmc_card_present() when validating for inserted card Date: Fri, 30 Dec 2016 13:47:30 +0100 Message-Id: <1483102054-1752-18-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1483102054-1752-1-git-send-email-ulf.hansson@linaro.org> References: <1483102054-1752-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 --- drivers/mmc/host/omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 Acked-by: Tony Lindgren Reviewed-by: Linus Walleij 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,