mmc: sdhci-acpi: Simplify code by using SET_SYSTEM_SLEEP_PM_OPS
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 27 Jul 2016 08:39:52 +0000 (10:39 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 27 Jul 2016 08:43:05 +0000 (10:43 +0200)
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 <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-acpi.c

index 458ffb7637e5f902984d4727a3ada9a1251b5d56..5bf4bcf2e59a458dbbac3cc6168846eea576c773 100644 (file)
@@ -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)
 };