From patchwork Wed Jul 27 11:32:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 72856 Delivered-To: patches@linaro.org Received: by 10.140.29.52 with SMTP id a49csp251311qga; Wed, 27 Jul 2016 04:32:27 -0700 (PDT) X-Received: by 10.46.5.196 with SMTP id 187mr11082329ljf.13.1469619137871; Wed, 27 Jul 2016 04:32:17 -0700 (PDT) Return-Path: Received: from mail-lf0-x233.google.com (mail-lf0-x233.google.com. [2a00:1450:4010:c07::233]) by mx.google.com with ESMTPS id n8si2963692lfi.264.2016.07.27.04.32.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jul 2016 04:32:17 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::233 as permitted sender) client-ip=2a00:1450:4010:c07::233; 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::233 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x233.google.com with SMTP id b199so25206206lfe.0 for ; Wed, 27 Jul 2016 04:32:17 -0700 (PDT) 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=FU2NsHn693Gy7JQGNI/Sj4kzAWjCyu7rRGOGwbmlBeg=; b=Kc/JUPya9DUUDODKyigzGn5S4ARcXbuu+x64SW9IzHNevXwq9fQ4x7L8Z6zOyzjQyt 13u3tn03qwyr1FyriuuwUdSa1H75+99qBcK+6y8v2HFdmgDBw4gbP7JxFUKqm7Vtgm0e NRMl2gUErwqM2/dWP3rjaNmkpvnJY/lbppyZk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FU2NsHn693Gy7JQGNI/Sj4kzAWjCyu7rRGOGwbmlBeg=; b=JZzKxcyiiFZWC9yoviG0pdcUrII1Bm/ZNkRAwnaB/gPbAwx4rH/yApwHRDxwVvm0PP wx7MaqLP96Ob1hxuRS9hcfVi/Kl0NmJfGzmFDBedzaCva6eFyy/25Ma5Nmvkp9Efqm/3 qqYlzIqDQHVG0rai2Wm45Oq1K1b3WcfEh7URXqkXcmJ+HIr0HSSdHpKYrXy3w2ITaL17 UrZYh0HPREgA+VwVIwwtPVi8MElUcPlYXHWAndyKRYEhg4Sn0fEE6BJwupdxItWhDd74 8xBsJthv3sGDBQzizqokvqhd3ZGvdYlHJBa0qVJID/GOci/TV5U+Uia2B4EScaFLUex6 sP0A== X-Gm-Message-State: AEkooutLgqdRrTxvDN3oEAO6AVJf7YO8EoSTETzABroSUHU+BkiJjSuhtUtTtsDrKyw+TKa3+VA= X-Received: by 10.25.126.6 with SMTP id z6mr9734863lfc.155.1469619137464; Wed, 27 Jul 2016 04:32:17 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-155-4-128-67.na.cust.bahnhof.se. [155.4.128.67]) by smtp.gmail.com with ESMTPSA id h62sm911164lji.28.2016.07.27.04.32.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Jul 2016 04:32:16 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter Cc: Arnd Bergmann Subject: [PATCH 04/11] mmc: sdhci-pxav3: Remove non needed #ifdef CONFIG_PM for dev_pm_ops Date: Wed, 27 Jul 2016 13:32:00 +0200 Message-Id: <1469619127-29283-5-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469619127-29283-1-git-send-email-ulf.hansson@linaro.org> References: <1469619127-29283-1-git-send-email-ulf.hansson@linaro.org> As the SET_SYSTEM_SLEEP_PM_OPS and the SET_RUNTIME_PM_OPS macro deals with the CONFIG_PM options when assigning the callbacks, it becomes redundant to control this when declaring the struct dev_pm_ops. Instead let's always declare it as it simplifies the code. Signed-off-by: Ulf Hansson --- drivers/mmc/host/sdhci-pxav3.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) -- 1.9.1 diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index 3013250..dd1938d 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -583,24 +583,17 @@ static int sdhci_pxav3_runtime_resume(struct device *dev) } #endif -#ifdef CONFIG_PM static const struct dev_pm_ops sdhci_pxav3_pmops = { SET_SYSTEM_SLEEP_PM_OPS(sdhci_pxav3_suspend, sdhci_pxav3_resume) SET_RUNTIME_PM_OPS(sdhci_pxav3_runtime_suspend, sdhci_pxav3_runtime_resume, NULL) }; -#define SDHCI_PXAV3_PMOPS (&sdhci_pxav3_pmops) - -#else -#define SDHCI_PXAV3_PMOPS NULL -#endif - static struct platform_driver sdhci_pxav3_driver = { .driver = { .name = "sdhci-pxav3", .of_match_table = of_match_ptr(sdhci_pxav3_of_match), - .pm = SDHCI_PXAV3_PMOPS, + .pm = &sdhci_pxav3_pmops, }, .probe = sdhci_pxav3_probe, .remove = sdhci_pxav3_remove,