From patchwork Wed Jul 27 11:32:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 72857 Delivered-To: patches@linaro.org Received: by 10.140.29.52 with SMTP id a49csp251353qga; Wed, 27 Jul 2016 04:32:31 -0700 (PDT) X-Received: by 10.25.145.135 with SMTP id t129mr11987555lfd.163.1469619139205; Wed, 27 Jul 2016 04:32:19 -0700 (PDT) Return-Path: Received: from mail-lf0-x234.google.com (mail-lf0-x234.google.com. [2a00:1450:4010:c07::234]) by mx.google.com with ESMTPS id o9si2979287lfe.16.2016.07.27.04.32.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jul 2016 04:32:19 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::234 as permitted sender) client-ip=2a00:1450:4010:c07::234; 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::234 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x234.google.com with SMTP id l69so25158942lfg.1 for ; Wed, 27 Jul 2016 04:32:19 -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=6Ekq6i/Ii2sThZQw9rxB6xK5HNp/ZVzj4rCDn6VKeCg=; b=d8K7i+ptk5IW9UNNVEIFlG54nswRkn/AjsqxulsU+ic4YAX5RSgbc82qRoC0pUdVlX crkF0d0P/fRHR6Yj/M2WTFX/5vcPUvBhakfE4Wy42yi5F3HtZVfbEZTBZRGamJTule1e 65FRR5c/JXZfl48087PDNuNhnFVEt1jnAJSr8= 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=6Ekq6i/Ii2sThZQw9rxB6xK5HNp/ZVzj4rCDn6VKeCg=; b=QB8MkH/t4k8Fxnyw45VlktqG8aXxTs2LelaNIPONaqJWKgc9y8r/qD36DSt+pcc0jd W6LYxJ4UFZvtAE4AGrHfepv3UU32ydxCEFGE89Ge05KiYg0RAGDGgTw2oyD3nUPY9bez 19UajAL8cuXSXDFg8nKanR59uKsr5oUgxK7Ur6uf+C4q4XFzxXnRhYGwu++Q5XvEKVss Dz3gyP5wrZl0iUM5x9xC3Rg/mq56R/tYiY1pUi4QGl8P8I7hymm+V5YfdZHV4XztQw7e OiOkaMcHw2181Y4I3kKW+dR12MXyo1LRvHwO0BXmBIaLsIkhPD95lNAFIp5KEGpjnqEG kC1g== X-Gm-Message-State: AEkoouv49HSqpoHTY27cq8ZAY87nor1kEp3fBHB6Ryw84z+X6v/sqmrsBPfrHAlzii5t6tQqx+4= X-Received: by 10.46.71.17 with SMTP id u17mr11190892lja.49.1469619138851; Wed, 27 Jul 2016 04:32:18 -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.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Jul 2016 04:32:17 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter Cc: Arnd Bergmann Subject: [PATCH 05/11] mmc: sdhci-s3c: Remove non needed #ifdef CONFIG_PM for dev_pm_ops Date: Wed, 27 Jul 2016 13:32:01 +0200 Message-Id: <1469619127-29283-6-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-s3c.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) -- 1.9.1 diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 70c724b..784c5a8 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -714,19 +714,12 @@ static int sdhci_s3c_runtime_resume(struct device *dev) } #endif -#ifdef CONFIG_PM static const struct dev_pm_ops sdhci_s3c_pmops = { SET_SYSTEM_SLEEP_PM_OPS(sdhci_s3c_suspend, sdhci_s3c_resume) SET_RUNTIME_PM_OPS(sdhci_s3c_runtime_suspend, sdhci_s3c_runtime_resume, NULL) }; -#define SDHCI_S3C_PMOPS (&sdhci_s3c_pmops) - -#else -#define SDHCI_S3C_PMOPS NULL -#endif - #if defined(CONFIG_CPU_EXYNOS4210) || defined(CONFIG_SOC_EXYNOS4212) static struct sdhci_s3c_drv_data exynos4_sdhci_drv_data = { .no_divider = true, @@ -765,7 +758,7 @@ static struct platform_driver sdhci_s3c_driver = { .driver = { .name = "s3c-sdhci", .of_match_table = of_match_ptr(sdhci_s3c_dt_match), - .pm = SDHCI_S3C_PMOPS, + .pm = &sdhci_s3c_pmops, }, };