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: 9509925 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 9A5026075C for ; Wed, 11 Jan 2017 11:52:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 846DE285D3 for ; Wed, 11 Jan 2017 11:52:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79167285EC; Wed, 11 Jan 2017 11:52:05 +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=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 6FBB9285F4 for ; Wed, 11 Jan 2017 11:52:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965074AbdAKLv6 (ORCPT ); Wed, 11 Jan 2017 06:51:58 -0500 Received: from mail-lf0-f54.google.com ([209.85.215.54]:35524 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965004AbdAKLv5 (ORCPT ); Wed, 11 Jan 2017 06:51:57 -0500 Received: by mail-lf0-f54.google.com with SMTP id m78so113822872lfg.2 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=VOAjZqQvjQG3unOvXc7lPSO6a4zdz+oLjmwHR1GnVzU2dPqT67cGXC6/RuQitMuSFf 3BydUexOT4ABkZaTZORnPsv/VE/U3IP3BHS5dmeECI6bWlDEmVX3YHlRORd0C1pHti1U +rmNT8Z2I0EJDQwaNKsbzY1+cssYp3ytpvATmhrNs3htXrBnTbHTKsCcTHjziy7mbnYn xogV1bNWIaYOreINDsZ3eIcDCeOOg94z6Z12suRFGxARCfUtlvAlSYN5TTkTKaSV+03h 64LwbgnRzZpnarWtjsr3dZdu+5/ud3GmaUkL3Norj7AXZ4yril/t+OjEQTaJyMfchuPt mWLg== X-Gm-Message-State: AIkVDXL6GnsEOwFgrYJkIeZzh/5jSx52rX8GCz2z+aR7yq92mdN1KADiu8heInCb94et3wcx X-Received: by 10.46.7.1 with SMTP id 1mr3276812ljh.76.1484135515875; Wed, 11 Jan 2017 03:51:55 -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 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> 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,