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: 9515621 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 0ADC960762 for ; Fri, 13 Jan 2017 13:15:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F38B2285A1 for ; Fri, 13 Jan 2017 13:15:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E84E528672; Fri, 13 Jan 2017 13:15:15 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 296D1285A1 for ; Fri, 13 Jan 2017 13:15:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751704AbdAMNPN (ORCPT ); Fri, 13 Jan 2017 08:15:13 -0500 Received: from mail-lf0-f53.google.com ([209.85.215.53]:34202 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751561AbdAMNPN (ORCPT ); Fri, 13 Jan 2017 08:15:13 -0500 Received: by mail-lf0-f53.google.com with SMTP id v186so37172969lfa.1 for ; Fri, 13 Jan 2017 05:15:12 -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=ByLQVT5a2PjzZEazBE98EAPE85GyYKXLO9w9C2kzlaeOEmFywtWfA9OUO+4OoJ/RLl dyZlOsdgXpM9UpAO1x4beov94162pfRBe3GiGeyMunOA6ula7P6J5QAr8/XzW7HSifqm I2HhhmQNrvaR25BHmwheWKC44k8PJy8UapZ85sphODHznHsXMMEHPnUe0wsRUagMMXrZ PHDx+1dfkRG5R6AxYjR0iXjnvTmtVC/SxCXg+177yRjsroUbPgJQVu+dSt1P0pwgH7+c YuYp1xrz91nUAQ/u8M7BhSQo2FtQHL/Wqx0NqCeMu2bQVyHIUdr7ZgD+o+JdHBQVXD0Y X8lw== X-Gm-Message-State: AIkVDXKqUCP+knodc6kCk+aRsf9sXqgePK2wsfJj4NA5yzMYeCLW3MbFLyQ5lqNuZkLYfLM4 X-Received: by 10.46.76.9 with SMTP id z9mr2885559lja.1.1484313311482; Fri, 13 Jan 2017 05:15:11 -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 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> 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,