From patchwork Fri Jun 26 10:00:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan T. Ivanov" X-Patchwork-Id: 6679881 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2E622C05AC for ; Fri, 26 Jun 2015 10:01:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5CB06206A1 for ; Fri, 26 Jun 2015 10:01:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB2D0206B6 for ; Fri, 26 Jun 2015 10:01:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752779AbbFZKAb (ORCPT ); Fri, 26 Jun 2015 06:00:31 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:33522 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752196AbbFZKAR (ORCPT ); Fri, 26 Jun 2015 06:00:17 -0400 Received: by wiwl6 with SMTP id l6so40808836wiw.0 for ; Fri, 26 Jun 2015 03:00:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=d4bhXdYnBUA8K1BkxjVCvKULCLErYgE/peionILtMis=; b=aF2LRFky6zf/JAtP13FnO/7BALsmVnaNJof6LBurFfXQ+JOl5vP11mTyd7ZS7r+hYS KHHQYzFSsfHsWkK6oHUzJvZ12RPWX5drlyJDXoTdrndJ8bQHYd229jzUAllsqRV2HPfJ Gttx9jL491iVc40Ss+p2po+F994baqJZqkEnmujcqk7Zc1vsfUNh6UixZjsKiJZoofsu CxHbCpsMgEji3pKCIp5WR1iSTeRU91t/EwGXUv7LswPSybZwkH0Be9DdrWaDaWFFW+22 0FTyR/7cqu87cWe4QDICYMJAJAXxzZebjJUzSWfAwGgEA9wiALZ5sHgjRVbKQq3cXUZP lfyQ== X-Gm-Message-State: ALoCoQmRcdgDUzJPCfEcjVn1m7Ouc/lZ1B20djA81NLaY+Dp8BrJfxn75j4xxyou2WVLG5yaY5ed X-Received: by 10.194.157.168 with SMTP id wn8mr1498082wjb.79.1435312816126; Fri, 26 Jun 2015 03:00:16 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by mx.google.com with ESMTPSA id ha4sm1506507wib.0.2015.06.26.03.00.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jun 2015 03:00:15 -0700 (PDT) From: "Ivan T. Ivanov" To: Ulf Hansson Cc: Adrian Hunter , Tim Kryger , Aisheng Dong , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 2/3] mmc: sdhci: don't use card state polling when CD GPIO is defined Date: Fri, 26 Jun 2015 13:00:09 +0300 Message-Id: <1435312810-23957-3-git-send-email-ivan.ivanov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435312810-23957-1-git-send-email-ivan.ivanov@linaro.org> References: <1435312810-23957-1-git-send-email-ivan.ivanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no reason to use polling for card detection state change when drivers are using dedicated GPIO for this. Don't poll in this case. Signed-off-by: Ivan T. Ivanov --- drivers/mmc/host/sdhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 8bafb9f..0b65752 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3121,7 +3121,8 @@ int sdhci_add_host(struct sdhci_host *host) mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED; if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) && - !(mmc->caps & MMC_CAP_NONREMOVABLE)) + !(mmc->caps & MMC_CAP_NONREMOVABLE) && + IS_ERR_VALUE(mmc_gpio_get_cd(host->mmc))) mmc->caps |= MMC_CAP_NEEDS_POLL; /* If there are external regulators, get them */