From patchwork Tue Sep 3 14:22:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 172804 Delivered-To: patches@linaro.org Received: by 2002:ac9:5c4b:0:0:0:0:0 with SMTP id r11csp5641591ocp; Tue, 3 Sep 2019 07:22:48 -0700 (PDT) X-Received: by 2002:a2e:9a41:: with SMTP id k1mr8144738ljj.153.1567520568159; Tue, 03 Sep 2019 07:22:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567520568; cv=none; d=google.com; s=arc-20160816; b=MleH1CsYku9RkiEQTonTM0oQICxVv63lYQkT92WF1KQANaVYUYYQYOxVNbsf8d4bGK 5VoJ888I+KO5ygW627KHmi8aWzfZ6tjqGyjidKIEi26sUCcBg+nBTYcKJPtbsbBqfqI/ 64mjgBswn69jB9Qk2pxaxjpCidFYq8SR4wKe42oBw/QNg3D+KfrOeT8R334zUy3FrhIH Wq7CkSCDn4dDbDifZnjt3pftaRVNHWho6dduww8pIc49GapYXfR7JJWVDRU8Q1zpqkZk 6urHYXvq9KYv8dsAz2jaqm/ni5xeNH1ITJCc/xF5QtvkWaWZ+G6Hazx7lB/Gv+BGOLEh e1vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nRD8RZZIfXxFxN/71F8TIreo7M10o8NGOL7lgd4hWxU=; b=WcjHEC+GSysbF6hivez6hyrEcArfKM2b9VGuRyZOIEBfbMVHBYoatrG3xtwzIO03SF DLld4S3k1TCxbcFd+vb7sSljt3j9Iz0IpdzFLbR5BXLcZpjTNaif2vBaDq2983HPLbPc cnK5Tne1zxzLbFREznCLM1LHWkCst6IrSLzq9F4joFR//DFDM1zktrlzGaUP+AvPft0f 9O2TFouMH8HafrV/U/Da+Xu8ODnCw1z9ZPCUezcaeuJqKrDat886sFfWQotJLF0VsL+Q h3QRgW25hvkmdQ7J9MmO5D2y5lzgsjvklxClSKY8lz6h22z6u80abI3g/tSnxo+4+sFP h1bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="J2D/ecsn"; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id r14sor4882148lfp.15.2019.09.03.07.22.47 for (Google Transport Security); Tue, 03 Sep 2019 07:22:48 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="J2D/ecsn"; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=nRD8RZZIfXxFxN/71F8TIreo7M10o8NGOL7lgd4hWxU=; b=J2D/ecsnkgDBU3gX4LMmTKbcJzk+6AjL8rx/Kjm2RA4Bpf1HLq5ZgxMvD4ooI7jbeO zwhtp/FEBOzXdDLSlByqRUC7VRwxF7xMgMlFf8m3RBZp0N4JgWe4fKxVyM+k7iJeNNVs bAeM/QQG8qs2PRoUhRDyHPrG61sV8f/dbndWhARzYr8iTyzTndoEVITYJ3HGDLRhI8G/ y3AWhLCI5OH9dZhYXg9X0sNfVNxMmjDANlm6XZU0Ghpuh+vDOEIXvyy92DalwjAe6bmL cLWVuDUK77glbB9x7RX+KX0jaoVqvuxsr59YmZhPhBOwIkIPdiQE44IOBox/NVJpOHXz jQWw== 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=nRD8RZZIfXxFxN/71F8TIreo7M10o8NGOL7lgd4hWxU=; b=osBwm2h9cusp1ZjcRBw5j8pvKxRzJv55bLTWbfc+H0SOuLf4b5kTZYrSXf+1pJm/7z ErT2b86vvmgDHOZN7Rzx7ee6FCdsjMzBNK8SbXnjJCk8yRlLWM0yIQ3BvU3QeZRR9AoA CGssPgGbO+6QkRXCGIZZ4qxZNYC0hQsF7qS4RKHFZlYwdjZdpGsmY4xcYxxHDHd7Mfmd 2QYGqI9CUawIL5Y49DC1YiIX0eLia0ltXcQZf1uJHD1hvaB9IueJsvYXUDo49xrw4aaj bIYQuLXj+ndZC7k0O0LNkB8FapLg/MhEaJquubBSVCEWDYxTmwMoTXSJbavxqGDFzPr6 CC8Q== X-Gm-Message-State: APjAAAV/KeWrIeblQjps0vuCe5YzEIaMiApYkNhFQol4cp/NS8fpGWi7 +uuYh+AyM+O2j5i8lGCvut8qrr14 X-Google-Smtp-Source: APXvYqzSHG0+TZa6KjRS808SzcPkET5qRVkq972VhJ8Mj2w5fbGg73wGEtlGxYnVldeA484PW/gp4A== X-Received: by 2002:ac2:514c:: with SMTP id q12mr7287750lfd.145.1567520567815; Tue, 03 Sep 2019 07:22:47 -0700 (PDT) Return-Path: Received: from uffe-XPS-13-9360.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v10sm2430862ljc.64.2019.09.03.07.22.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 07:22:47 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter , Douglas Anderson , Matthias Kaehlcke Cc: Shawn Lin , Jaehoon Chung , Yong Mao , Chaotian Jing , linux-kernel@vger.kernel.org Subject: [PATCH 11/11] mmc: sdhci: Convert to use sdio_irq_enabled() Date: Tue, 3 Sep 2019 16:22:07 +0200 Message-Id: <20190903142207.5825-12-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903142207.5825-1-ulf.hansson@linaro.org> References: <20190903142207.5825-1-ulf.hansson@linaro.org> Instead of keeping track of whether SDIO IRQs have been enabled via an internal sdhci status flag, avoid the open-coding and convert into using sdio_irq_enabled(). Signed-off-by: Ulf Hansson --- drivers/mmc/host/sdhci.c | 7 +------ drivers/mmc/host/sdhci.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) -- 2.17.1 diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index a7df22ed65aa..4b4db41aec50 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2142,11 +2142,6 @@ void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable) pm_runtime_get_noresume(host->mmc->parent); spin_lock_irqsave(&host->lock, flags); - if (enable) - host->flags |= SDHCI_SDIO_IRQ_ENABLED; - else - host->flags &= ~SDHCI_SDIO_IRQ_ENABLED; - sdhci_enable_sdio_irq_nolock(host, enable); spin_unlock_irqrestore(&host->lock, flags); @@ -3380,7 +3375,7 @@ int sdhci_runtime_resume_host(struct sdhci_host *host, int soft_reset) host->runtime_suspended = false; /* Enable SDIO IRQ */ - if (host->flags & SDHCI_SDIO_IRQ_ENABLED) + if (sdio_irq_enabled(mmc)) sdhci_enable_sdio_irq_nolock(host, true); /* Enable Card Detection */ diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 8effaac61c3a..a29c4cd2d92e 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -512,7 +512,6 @@ struct sdhci_host { #define SDHCI_AUTO_CMD12 (1<<6) /* Auto CMD12 support */ #define SDHCI_AUTO_CMD23 (1<<7) /* Auto CMD23 support */ #define SDHCI_PV_ENABLED (1<<8) /* Preset value enabled */ -#define SDHCI_SDIO_IRQ_ENABLED (1<<9) /* SDIO irq enabled */ #define SDHCI_USE_64_BIT_DMA (1<<12) /* Use 64-bit DMA */ #define SDHCI_HS400_TUNING (1<<13) /* Tuning for HS400 */ #define SDHCI_SIGNALING_330 (1<<14) /* Host is capable of 3.3V signaling */