From patchwork Tue Jan 10 15:10:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 90715 Delivered-To: patches@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1058540obz; Tue, 10 Jan 2017 07:11:09 -0800 (PST) X-Received: by 10.46.21.68 with SMTP id 4mr1301279ljv.11.1484061069246; Tue, 10 Jan 2017 07:11:09 -0800 (PST) Return-Path: Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com. [2a00:1450:4010:c07::22b]) by mx.google.com with ESMTPS id 32si1429851lfq.411.2017.01.10.07.11.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jan 2017 07:11:09 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22b as permitted sender) client-ip=2a00:1450:4010:c07::22b; 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::22b as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x22b.google.com with SMTP id k86so117548966lfi.0 for ; Tue, 10 Jan 2017 07:11:09 -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=MWBPqecqOj983iCSi4tHv6syPryX38mINM8mS4+tG5g=; b=dWAQrIA8K882eaOZn5ow3rIfayHKpPEggIzaYz9MYoedD1dHZR/o/pVb46cAgz4FIr cmEEGG86ip07R0sjajDBlZvGgvEZPQth7Z4bn9f9NrQa7TtWSqm+vcvGdCKGf2yD/7tX GvDwwwfIedWtkPYzGB96dptSq0bcMxXEGRjcM= 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=MWBPqecqOj983iCSi4tHv6syPryX38mINM8mS4+tG5g=; b=tkA78ElS+5AtNH2KgKHSYJXultrTQ8EoExhsX8EcuMsqWIKBSqR80BenSWDzpGLkoA AGCFcEL/batrbzlCpK43wmC/0vgkoqndWzXfPTzACwArz7TfQrPujUEF5RHTODDtPL7v UNXij4c1sL1ED7HQShSzsLUy4jUJvLo3Cn7PwA61h5u7oEdl7ryRCwyHHTRlvkuyS8nq ve9oF155/fWf9DydqL6RmDV7Sw5aSWk9heo68GURoZs2+ZKR5f9X/EcMpG0i3LZG4Spk MQnyr7mVCY5NsWM6+2SrMX0XRyqd2qK00P6bHgvFTc3WRPfEJ2KXY9xuxclGNdrt08Za hIpA== X-Gm-Message-State: AIkVDXKi5KWacmgDJa2MQPAd9gy6gjSvAMkm8qoFFPEt5LUrcoH0XUw485EMVsrha9BX6+/sJMw= X-Received: by 10.25.18.102 with SMTP id h99mr1384737lfi.179.1484061068761; Tue, 10 Jan 2017 07:11:08 -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 a184sm533774lfb.34.2017.01.10.07.11.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Jan 2017 07:11:06 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Wolfram Sang , Simon Horman Subject: [PATCH] mmc: tmio: Remove redundant check of mmc->slot.cd_irq Date: Tue, 10 Jan 2017 16:10:52 +0100 Message-Id: <1484061052-25334-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 To validate whether native hotplug needs to be used, the tmio driver checks whether the mmc->slot.cd_irq has been successfully assigned. This check is redundant at its current place in tmio_mmc_host_probe(), as the mmc core assigns mmc->slot.cd_irq a valid value first when mmc_gpiod_request_cd_irq() is called. Therefore, let's just remove the check for now, as that also removes a layering violation of the tmio driver accessing core specific data via ->slot.cd_irq. Signed-off-by: Ulf Hansson --- drivers/mmc/host/tmio_mmc_pio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.9.1 Reviewed-by: Wolfram Sang diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index 3ca97f3..0ef5780 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -1177,8 +1177,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_card_is_removable(mmc)); /* * On Gen2+, eMMC with NONREMOVABLE currently fails because native