From: peter.griffin@linaro.org (Peter Griffin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] mmc: sdhci-acpi.c: Use SET_RUNTIME_PM_OPS macro to set runtime pm callbacks
Date: Tue, 12 Aug 2014 17:14:29 +0100 [thread overview]
Message-ID: <1407860069-12706-6-git-send-email-peter.griffin@linaro.org> (raw)
In-Reply-To: <1407860069-12706-1-git-send-email-peter.griffin@linaro.org>
This allows us to get rid of the #else condition, as the macro compiles
away to nothing if not enabled.
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
drivers/mmc/host/sdhci-acpi.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index 8ce3c28..3a42540 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -383,20 +383,13 @@ static int sdhci_acpi_runtime_idle(struct device *dev)
return 0;
}
-#else
-
-#define sdhci_acpi_runtime_suspend NULL
-#define sdhci_acpi_runtime_resume NULL
-#define sdhci_acpi_runtime_idle NULL
-
#endif
static const struct dev_pm_ops sdhci_acpi_pm_ops = {
.suspend = sdhci_acpi_suspend,
.resume = sdhci_acpi_resume,
- .runtime_suspend = sdhci_acpi_runtime_suspend,
- .runtime_resume = sdhci_acpi_runtime_resume,
- .runtime_idle = sdhci_acpi_runtime_idle,
+ SET_RUNTIME_PM_OPS(sdhci_acpi_runtime_suspend,
+ sdhci_acpi_runtime_resume, sdhci_acpi_runtime_idle)
};
static struct platform_driver sdhci_acpi_driver = {
--
1.9.1
next prev parent reply other threads:[~2014-08-12 16:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 16:14 [PATCH 0/5] MMC cleanup of dev_pm_ops and .owner Peter Griffin
2014-08-12 16:14 ` [PATCH 1/5] mmc: remove .owner field for drivers using module_platform_driver Peter Griffin
2014-08-18 14:19 ` Michal Simek
2014-08-21 13:11 ` Peter Griffin
2014-08-12 16:14 ` [PATCH 2/5] mmc: dw_mmc-pci: Remove superflous #else condition on CONFIG_PM_SLEEP Peter Griffin
2014-08-12 16:14 ` [PATCH 3/5] mmc: dw_mmc-pltfm: " Peter Griffin
2014-08-12 16:14 ` [PATCH 4/5] mmc: sdhci-pci: Use SET_RUNTIME_PM_OPS macro to set runtime pm callbacks Peter Griffin
2014-08-12 16:14 ` Peter Griffin [this message]
2014-08-18 12:38 ` [PATCH 0/5] MMC cleanup of dev_pm_ops and .owner Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1407860069-12706-6-git-send-email-peter.griffin@linaro.org \
--to=peter.griffin@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).