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: 50339 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CF14022902 for ; Fri, 26 Jun 2015 10:00:51 +0000 (UTC) Received: by laer2 with SMTP id r2sf25623130lae.3 for ; Fri, 26 Jun 2015 03:00:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=eODxKfKVvpZSEwzlcGn+eqnmqMUo3zk9DDinXLzvqT4=; b=WFtKgU6yefdTPDAnBlDFBcAHgnx2onAt11R8ZmJ4ujyBU32JLZ/jpyMSSGD/PdRSWo Y1wtqamh10oDo5/UGoE1aVi2QD/ChG+TcLWK15t2XcT3mt0ln7AbX/sXR7sjKiz5k6c/ 7JxP7tT+3BC0pApcjIw6115gP95YtNzqtGv1A6Ch9LHIYIPqPLu9UTQl2ooenk1Y6qwj sWvUQvdkB/sb/ZvvA6JpGlwaIrFnf0Y9tV4gEqoxShFpxfSry15F4VVvo1fIXJxOS5RH 17/Xl4cPc8u0bQ0eTEGrqLPFNvi02ehsdpreXQzbNKg6rBAq1mnmSUxHNGtUUys7qCDK P1eQ== X-Gm-Message-State: ALoCoQmhNtWF+QiJI9LFKCzDqEcszC4bcOQvUAjGVemEUzFevSRXEXhAKjBZ6bSvOf3yH9SbtRrp X-Received: by 10.180.189.50 with SMTP id gf18mr1351304wic.3.1435312850687; Fri, 26 Jun 2015 03:00:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.179.201 with SMTP id di9ls493501lac.92.gmail; Fri, 26 Jun 2015 03:00:50 -0700 (PDT) X-Received: by 10.112.126.42 with SMTP id mv10mr856183lbb.58.1435312850459; Fri, 26 Jun 2015 03:00:50 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id rd3si26964779lac.167.2015.06.26.03.00.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jun 2015 03:00:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbnk3 with SMTP id k3so61379107lbn.1 for ; Fri, 26 Jun 2015 03:00:50 -0700 (PDT) X-Received: by 10.112.209.106 with SMTP id ml10mr814940lbc.112.1435312850036; Fri, 26 Jun 2015 03:00:50 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1193978lbb; Fri, 26 Jun 2015 03:00:49 -0700 (PDT) X-Received: by 10.66.229.65 with SMTP id so1mr1790911pac.92.1435312845307; Fri, 26 Jun 2015 03:00:45 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pz9si15979477pdb.3.2015.06.26.03.00.43; Fri, 26 Jun 2015 03:00:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752853AbbFZKAj (ORCPT + 30 others); Fri, 26 Jun 2015 06:00:39 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:34938 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751568AbbFZKAR (ORCPT ); Fri, 26 Jun 2015 06:00:17 -0400 Received: by wgjx7 with SMTP id x7so10886528wgj.2 for ; Fri, 26 Jun 2015 03:00:16 -0700 (PDT) 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-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ivan.ivanov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ 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 */