From patchwork Fri Jan 13 13:14:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 91414 Delivered-To: patches@linaro.org Received: by 10.182.3.34 with SMTP id 2csp131257obz; Fri, 13 Jan 2017 05:15:12 -0800 (PST) X-Received: by 10.25.66.70 with SMTP id p67mr2610787lfa.99.1484313311927; Fri, 13 Jan 2017 05:15:11 -0800 (PST) Return-Path: Received: from mail-lf0-x22a.google.com (mail-lf0-x22a.google.com. [2a00:1450:4010:c07::22a]) by mx.google.com with ESMTPS id 94si664277lfw.79.2017.01.13.05.15.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jan 2017 05:15:11 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22a as permitted sender) client-ip=2a00:1450:4010:c07::22a; 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::22a 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-x22a.google.com with SMTP id z134so33627735lff.3 for ; Fri, 13 Jan 2017 05:15:11 -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=eFX7p+JUzfvQoMUvcm2HnPZv5DYV3ctSK7nYmOaysgzoSvJ1jCGwTsiN1RToc3wJrL 6+N9epu+YKam0jsHAV4IWmubxks13htt/wNcB/QELlm7CHUTKWHJWkVw4C8H/ncxyZnv if2qHmz3sXooCz1Vm0EDycyUsXRIgqjqmp/Jg= 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=cAlrunI3q/MaCBZQiWR5XX5hiZQuD0b/np/9vr9lRrcirgsOZzZG1wNjL3hasSvJeA 84dGzNXJxcFRA3FeMa+MBbjCLDgf5kLu8ZzEzaH284DNov4Ur9h9/nUIKj9rLwYdDR0c 31itz1gn42f+saxTW+14lgvbjjlZd8x/g8jBmLb4ZjiOJ4Xrqvb1ra9MIzYLg8gCQYFV OM4ztBAGz8KH7CXNYcnjQEra0VcgE9HyTxpH2bT/GPOki9e4egHtTUXAGRpYUq/1v3X8 wA4tBjk/QD5v7gPwL2yAbSrSy0CR/+IcU8E42uMNvOM4O5+YNK5oDifVst632nbKPyH2 GzqQ== X-Gm-Message-State: AIkVDXI5TbNRHZaTdb7kEOO6d8DibrlCTz4TubryzK8KqgMM9oL+LIIJd+ulSBzPc0LmF74tHhA= X-Received: by 10.46.76.9 with SMTP id z9mr2885559lja.1.1484313311482; Fri, 13 Jan 2017 05:15:11 -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 l67sm2931452lfb.15.2017.01.13.05.15.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jan 2017 05:15:10 -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 v3 11/15] mmc: omap: Don't use mmc_card_present() when validating for inserted card Date: Fri, 13 Jan 2017 14:14:12 +0100 Message-Id: <1484313256-25993-12-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484313256-25993-1-git-send-email-ulf.hansson@linaro.org> References: <1484313256-25993-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,