mmc: sdhci-acpi.c: Use SET_RUNTIME_PM_OPS macro to set runtime pm callbacks
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> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
f3a92b1a32
commit
1d75f74b14
@ -385,20 +385,13 @@ static int sdhci_acpi_runtime_idle(struct device *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define sdhci_acpi_runtime_suspend NULL
|
|
||||||
#define sdhci_acpi_runtime_resume NULL
|
|
||||||
#define sdhci_acpi_runtime_idle NULL
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct dev_pm_ops sdhci_acpi_pm_ops = {
|
static const struct dev_pm_ops sdhci_acpi_pm_ops = {
|
||||||
.suspend = sdhci_acpi_suspend,
|
.suspend = sdhci_acpi_suspend,
|
||||||
.resume = sdhci_acpi_resume,
|
.resume = sdhci_acpi_resume,
|
||||||
.runtime_suspend = sdhci_acpi_runtime_suspend,
|
SET_RUNTIME_PM_OPS(sdhci_acpi_runtime_suspend,
|
||||||
.runtime_resume = sdhci_acpi_runtime_resume,
|
sdhci_acpi_runtime_resume, sdhci_acpi_runtime_idle)
|
||||||
.runtime_idle = sdhci_acpi_runtime_idle,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_driver sdhci_acpi_driver = {
|
static struct platform_driver sdhci_acpi_driver = {
|
||||||
|
Loading…
Reference in New Issue
Block a user