From patchwork Fri Dec 30 11:39:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 89332 Delivered-To: patches@linaro.org Received: by 10.140.20.101 with SMTP id 92csp6400758qgi; Fri, 30 Dec 2016 03:39:57 -0800 (PST) X-Received: by 10.46.5.136 with SMTP id 130mr15638162ljf.36.1483097997847; Fri, 30 Dec 2016 03:39:57 -0800 (PST) Return-Path: Received: from mail-lf0-x22a.google.com (mail-lf0-x22a.google.com. [2a00:1450:4010:c07::22a]) by mx.google.com with ESMTPS id t11si3385901ljd.50.2016.12.30.03.39.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Dec 2016 03:39:57 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22a as permitted sender) client-ip=2a00:1450:4010:c07::22a; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22a as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x22a.google.com with SMTP id t196so235990443lff.3 for ; Fri, 30 Dec 2016 03:39:57 -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; bh=Hm0ejNYHRD1IeTT7L8F4jtetkNA1zWqIWYtc5qMxZzI=; b=G5fylTllCp3Hj7lvittszCoT4ZScuKX0Q2tuEK3btIKB9cWcuzI9/8+UeSfBucckeB 64/GwI6emdP12z3C1vPzucjtbpEjq5cXyd3BjIndb9+inxWCmiKZTRMXmtpcya9rosdn 8IHAKIEl1jx9w3IRM9PG2goB03SP6J8kpf3e8= 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; bh=Hm0ejNYHRD1IeTT7L8F4jtetkNA1zWqIWYtc5qMxZzI=; b=mEDypGpyLaEv8lZuot8UxbQxMfevB/p9FwqhUflpX7L9QoPqXJcsi3zGTbqnoWOFst hQdGwDlXNPEBG+6puZ3RL9791WflrmFBoFSsd4n6rtzFmo+L63g6MZGgTmQorC28Fz6A guhkTYtYvhsze2SdrFhpI3Zz70xI05jNn9jwtvqkRMgCBsaV+DqPEpCR2aLTIZeXIiP9 87MSyPPgCrtzyAVPF/Bol6Xcvc9pqozScPCASLSy9BDtJ7DYQdavIZ71uro/+AIrfOAI Hde7vK/DMDO03cy5IWVTXn/gtATROd4cPWAM/VvF/FrQBMYzH7w+Zqi6vWfeL9xdOHV9 7ECQ== X-Gm-Message-State: AIkVDXKB7PKQCmpJM1LlWmQ8FpttMPI5wATDRPrYRoegg4hfqSFK2IvGhxzJWFa99VnkcNuLv/E= X-Received: by 10.46.0.101 with SMTP id 98mr16070742lja.23.1483097997411; Fri, 30 Dec 2016 03:39:57 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-155-4-221-67.na.cust.bahnhof.se. [155.4.221.67]) by smtp.gmail.com with ESMTPSA id v17sm13654949lja.43.2016.12.30.03.39.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Dec 2016 03:39:55 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Wolfram Sang , Simon Horman Subject: [PATCH] mmc: tmio: Use mmc_can_gpio_cd() when validating for native hotplug Date: Fri, 30 Dec 2016 12:39:45 +0100 Message-Id: <1483097985-22446-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 To validate whether native hotplug is intended to be used, the tmio driver checks whether the GPIO isr has been successfully assigned. This isn't entirely correct, as GPIO could still be used for card detect, but in a polling mode. Therefore, let's convert to use the correct mmc interface, mmc_can_gpio_cd() as it tells exactly what we need for the native hotplug validation. Signed-off-by: Ulf Hansson --- drivers/mmc/host/tmio_mmc_pio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index 3ca97f3..580ca9c 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -1178,7 +1178,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, _host->native_hotplug = !(pdata->flags & TMIO_MMC_USE_GPIO_CD || mmc->caps & MMC_CAP_NEEDS_POLL || !mmc_card_is_removable(mmc) || - mmc->slot.cd_irq >= 0); + mmc_can_gpio_cd(mmc)); /* * On Gen2+, eMMC with NONREMOVABLE currently fails because native