From patchwork Wed Jul 27 11:31:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 72854 Delivered-To: patches@linaro.org Received: by 10.140.29.52 with SMTP id a49csp251229qga; Wed, 27 Jul 2016 04:32:16 -0700 (PDT) X-Received: by 10.25.217.146 with SMTP id s18mr9727984lfi.46.1469619134509; Wed, 27 Jul 2016 04:32:14 -0700 (PDT) Return-Path: Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com. [2a00:1450:4010:c07::230]) by mx.google.com with ESMTPS id 11si2963583lfv.306.2016.07.27.04.32.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jul 2016 04:32:14 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::230 as permitted sender) client-ip=2a00:1450:4010:c07::230; 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::230 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x230.google.com with SMTP id f93so25145411lfi.2 for ; Wed, 27 Jul 2016 04:32:14 -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=fQ0tge98ZAtiWPWKwUcqmdCe3slj5mkp3Qx3AO/2EfM=; b=kk/XVz4GXp5GWnZzJJBWeu2g7kVlD3CSWdZCE3Sk+fFqOUZKkAM5WQfzDSFfZDOwtE RPtOgfQCXjfueoM/OsKRsJtWlaaC8vJGIl4Y+rr4qCw3/dTzeq1vbbLNX7s6oJKok1IN GmLE/QsY1xRacIaFPR0ey+KsDybA3uOOXCp5c= 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=fQ0tge98ZAtiWPWKwUcqmdCe3slj5mkp3Qx3AO/2EfM=; b=JrVnkEtKFBP8Y6iZc20ZvEAdckUJ9kP0bAduZ0rvuGJqWcNO/9wLuq5qgFMnxwOf0Y vpAu3zQiB1HfkWNzJ6IZbeG9RjOEuIuFlSIrUmhl3/c/J4yOUAKYIZg3RIObcahlMxNG I/rqu0FjziNFLD4zTPUkjWTde0wJ+CzlkoQ6l60H4ja+Wb4279I3fRsqMB0fQ55DOz7x 1YXf0SjaoD7jOMeC0wkfAHDORtdOWzv10VTo9dCRo64zavvPlXeij4niS+ukBQ7Cnrpg oacjmemzYauUObRtClpuWcpkgNtc7ps58hwNwihnlWHBNqfVWYrijcf/scE4XCPEH1EI Jwzg== X-Gm-Message-State: AEkoouvqs5PVgK2o2nBJZ1LEOsQBsdfNsna2tMRPfEmIKvw5EgNq7hHk9CLzwAk+sTFWLkurw9c= X-Received: by 10.25.42.82 with SMTP id q79mr11890026lfq.102.1469619134170; Wed, 27 Jul 2016 04:32:14 -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.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Jul 2016 04:32:12 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter Cc: Arnd Bergmann Subject: [PATCH 02/11] mmc: sdhci-acpi: Simplify code by using SET_SYSTEM_SLEEP_PM_OPS Date: Wed, 27 Jul 2016 13:31:58 +0200 Message-Id: <1469619127-29283-3-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> By using the SET_SYSTEM_SLEEP_PM_OPS when assigning the system PM callbacks, we can remove some #ifdefs so code becomes a bit cleaner. Signed-off-by: Ulf Hansson --- drivers/mmc/host/sdhci-acpi.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 1.9.1 diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 458ffb7..5bf4bcf 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -531,11 +531,6 @@ static int sdhci_acpi_resume(struct device *dev) return sdhci_resume_host(c->host); } -#else - -#define sdhci_acpi_suspend NULL -#define sdhci_acpi_resume NULL - #endif #ifdef CONFIG_PM @@ -559,8 +554,7 @@ static int sdhci_acpi_runtime_resume(struct device *dev) #endif static const struct dev_pm_ops sdhci_acpi_pm_ops = { - .suspend = sdhci_acpi_suspend, - .resume = sdhci_acpi_resume, + SET_SYSTEM_SLEEP_PM_OPS(sdhci_acpi_suspend, sdhci_acpi_resume) SET_RUNTIME_PM_OPS(sdhci_acpi_runtime_suspend, sdhci_acpi_runtime_resume, NULL) };