diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2018-05-30 09:02:16 -0400 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-05-30 09:02:16 -0400 |
commit | af6b8ff4bce4ea43e89236339f84fc0a26044c42 (patch) | |
tree | 98c1ad9d46b6f159a6b818fe0c8d91337e6e9950 | |
parent | d8edfc4edd2ecaf7848a5f7533cac1178fac5bcc (diff) |
mmc: sunxi: Use ifdef rather than __maybe_unused
To be consistent with code in other mmc host drivers, convert to check the
correct PM config #ifdef in favor of using __maybe_unused.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/sunxi-mmc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 837888b96bd3..e7472590f2ed 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c | |||
@@ -1432,7 +1432,8 @@ static int sunxi_mmc_remove(struct platform_device *pdev) | |||
1432 | return 0; | 1432 | return 0; |
1433 | } | 1433 | } |
1434 | 1434 | ||
1435 | static int __maybe_unused sunxi_mmc_runtime_resume(struct device *dev) | 1435 | #ifdef CONFIG_PM |
1436 | static int sunxi_mmc_runtime_resume(struct device *dev) | ||
1436 | { | 1437 | { |
1437 | struct mmc_host *mmc = dev_get_drvdata(dev); | 1438 | struct mmc_host *mmc = dev_get_drvdata(dev); |
1438 | struct sunxi_mmc_host *host = mmc_priv(mmc); | 1439 | struct sunxi_mmc_host *host = mmc_priv(mmc); |
@@ -1449,7 +1450,7 @@ static int __maybe_unused sunxi_mmc_runtime_resume(struct device *dev) | |||
1449 | return 0; | 1450 | return 0; |
1450 | } | 1451 | } |
1451 | 1452 | ||
1452 | static int __maybe_unused sunxi_mmc_runtime_suspend(struct device *dev) | 1453 | static int sunxi_mmc_runtime_suspend(struct device *dev) |
1453 | { | 1454 | { |
1454 | struct mmc_host *mmc = dev_get_drvdata(dev); | 1455 | struct mmc_host *mmc = dev_get_drvdata(dev); |
1455 | struct sunxi_mmc_host *host = mmc_priv(mmc); | 1456 | struct sunxi_mmc_host *host = mmc_priv(mmc); |
@@ -1459,6 +1460,7 @@ static int __maybe_unused sunxi_mmc_runtime_suspend(struct device *dev) | |||
1459 | 1460 | ||
1460 | return 0; | 1461 | return 0; |
1461 | } | 1462 | } |
1463 | #endif | ||
1462 | 1464 | ||
1463 | static const struct dev_pm_ops sunxi_mmc_pm_ops = { | 1465 | static const struct dev_pm_ops sunxi_mmc_pm_ops = { |
1464 | SET_RUNTIME_PM_OPS(sunxi_mmc_runtime_suspend, | 1466 | SET_RUNTIME_PM_OPS(sunxi_mmc_runtime_suspend, |