From patchwork Sun Sep 8 10:12:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 173346 Delivered-To: patches@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp3003190ilq; Sun, 8 Sep 2019 03:12:57 -0700 (PDT) X-Received: by 2002:a19:431e:: with SMTP id q30mr12613016lfa.171.1567937576936; Sun, 08 Sep 2019 03:12:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567937576; cv=none; d=google.com; s=arc-20160816; b=DQvvIrrR8rrKCC+Rza9XQTp/ZYWeFjIBw3JnopRqqhpSl81hYZ29/0yBK+A+szjITP WSAv3xFiTy2DQz2aFUh4y0t728aplICNqqfbQwfyFPGnOf21rNUmVdp55cRpLYL4l/GS A1zvGuSlHkVDnIioDHy+DX7JsRzIwvO2iZIKn9soVcjYfrJ4Th/6oIwoYVTyvbLL8mfz ut8FSzjrChlJH12FDVcoFO3fL9YhEsf5nBAoetrwzngosaaNwM2j6bwi32Iotiuf/Ijt bd/Ecbp5K2hfsreKaiNPu7Syfp7z7ztQ3NoeFC00N+RWdv3jHjSo1LGOAF3g7hPnFTBk FQgw== 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=3w96KtsEyQIf1hGAVsd0wnGyK35jZHwym8BrQsTbnec=; b=rybXDmRKInlfMcCunF/BQZ/rUad7MeoL5C4S3F/4fbwTPdLSh+/MLSmeaE5hPDYD1n HcjhTEtKDACkt/Ad+YIFwPhCN7CFAjVu/cgu/29pHd07V5bp5Yku0WNpSyWEJl+yL76R pyO/AwpNF4ByAuX2wO2KYHFsXZaBqMmqSJGWByvHluW3ClokNMFS+mVAMAQuiRCjT2wm BAeILTj54HtZHFHhor9FGIq245I0IRe3ItqysAeK2t86LF5VxxI+Z0S8+iccr+nvOMYU M3fCL5/CHx+cBZG74GNOHbN4TY+dRFvxm/ocOfDISl9RQ6zAaf2XnJRh5h+wtoS2O6sJ q3Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fLGdd4+B; 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 w7sor3226747lfn.2.2019.09.08.03.12.56 for (Google Transport Security); Sun, 08 Sep 2019 03:12:56 -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=fLGdd4+B; 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=3w96KtsEyQIf1hGAVsd0wnGyK35jZHwym8BrQsTbnec=; b=fLGdd4+BgfMFa2gyfbBQXvCUukG5s+sE/ms976Wf2QRgaMPYjEzEyWGYVWAPY5Grdr +3vSvz+rJQTCMmu7qd+DM0m5dasetQHBbMpOWzIkE9yWH5udVAC+2qjqKuYd4Tu0we5M ErE26ZXoCKnSk2fSQcsXmvVyB7XdJ9FSieot7Hn9AFLkUeTjA5vLWjPpeC7KwlEgiCYZ 1FLHq+8xlEXxx+A1TOko8hMSDhfTmSyXxjigJ7MS9muhjwiHEGZ6mOGwKIVJhhbQv6eY vNf0aIlnQpAOBPJNpHdlV5HFzUuGa4nltukhJbeoiWL1T+FPuAnF65iVfkOHI28c4WXR 1CQg== 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=3w96KtsEyQIf1hGAVsd0wnGyK35jZHwym8BrQsTbnec=; b=aJ+n6zU6ZOiXudqYFuW8n09TdZQcrm3+/Ku7Tc3NvIs8KXcG8X8REFknur+/el+sEh NupPzn4gpID1sen4Yli/lOSIqZLBxecrUXVpMPzDo3xer8jdLxunJMeCleg1wkHUWz3c ROxZF2HtVsY626/vuWY/FhgKg8X7aNyGiczbwmSgq2UNnY8VQggJtaZSKJCnkejWc6yd SkGmHczTWuug816n5QOICEfJihmrGfFkNA/3SkcpR472tzA4skNUME6KpoTfMrlnZFJh XFdL4olCvtsLnaFiNIH72e8Pgyw47m5g5hBU2pwnRD2EKn1BEsPYWlqaH7mc7C6Jv2vB vmPA== X-Gm-Message-State: APjAAAXo8CWbbvpxDkcjo3SMhCPVruLNWuynHWCI7MsgFwVWma689eNj eNZK32Wj+cF9HoTmaDzij7pQE/D7 X-Google-Smtp-Source: APXvYqxC+7Ix/scWWeDIi59L/pZevcfUOeJNswESUdyorlg79fmFVsljPaZy8gFr/5NJfCk+RW/2fg== X-Received: by 2002:a19:3fd1:: with SMTP id m200mr12542682lfa.18.1567937576585; Sun, 08 Sep 2019 03:12:56 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([185.122.190.73]) by smtp.gmail.com with ESMTPSA id h25sm2444849lfj.81.2019.09.08.03.12.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Sep 2019 03:12:55 -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 v2 11/11] mmc: sdhci: Convert to use sdio_irq_claimed() Date: Sun, 8 Sep 2019 12:12:36 +0200 Message-Id: <20190908101236.2802-12-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190908101236.2802-1-ulf.hansson@linaro.org> References: <20190908101236.2802-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_claimed(). Reviewed-by: Matthias Kaehlcke 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 4c4285387b47..4b297f397326 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2144,11 +2144,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); @@ -3382,7 +3377,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_claimed(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 */