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: 9492109 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 82DCC60417 for ; Fri, 30 Dec 2016 12:48:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75EB31FF1D for ; Fri, 30 Dec 2016 12:48:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AA6122638; Fri, 30 Dec 2016 12:48:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FF7B223B2 for ; Fri, 30 Dec 2016 12:48:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753909AbcL3Msi (ORCPT ); Fri, 30 Dec 2016 07:48:38 -0500 Received: from mail-lf0-f48.google.com ([209.85.215.48]:36523 "EHLO mail-lf0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753785AbcL3Msh (ORCPT ); Fri, 30 Dec 2016 07:48:37 -0500 Received: by mail-lf0-f48.google.com with SMTP id t196so236788315lff.3 for ; Fri, 30 Dec 2016 04:48:37 -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=BdqVmRbBSuqKke06iJJDZO/mzgBn9hUcHu8sVQN30rdvsjfvPztdvLjZarNOwYL+vS 0jw6E+OWHaMX7MXe1FoQMeVIweWnKz7d3oO/kPOa8FracWI2eewWAQI6MKDCjz20yg5+ Oyzvec+CFp6c/8XiKzI+bj07T3LUM1HILGwFS39ZdO3n36H1ODeWDIwICqwbXX/uOlQB dLeb9WcwUV00V+g/w39DMQRBQDPbwIMv5uXn/R/BKvMbenhRCSG/RVMJxUpi0CueYBdC 6fuuBzDDPBJXcTCk5TRhMCGK5C86BvJEM0oTjxgalCxMGZ6cMvqlZCWPlmcDpsmYQ+HJ D/2w== X-Gm-Message-State: AIkVDXK/YLIlAq7v6t4xQTaz+igAutYfw7UoRmNsWJh/BPtPN/R9ts+sV+kcofF9vyV8rrnZ X-Received: by 10.46.8.25 with SMTP id 25mr17118930lji.21.1483102116269; Fri, 30 Dec 2016 04:48:36 -0800 (PST) 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> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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,