diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-09-06 09:20:05 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-09-07 04:08:57 -0400 |
commit | 522ef6144fe46ec2a74fa8778a73f2bd2cf0f9bb (patch) | |
tree | afe80326bcf17a256c382b5fd54948fa246bec35 | |
parent | fdea2d09b997ba4c86e7a707a5fac87c305f2131 (diff) |
dmaengine: cppi41: mark PM functions as __maybe_unused
When CONFIG_PM_SLEEP is disabled, we get a build error in
the cppi41 dmaengine driver, since the runtime-pm functions
are hidden within the wrong #ifdef:
drivers/dma/cppi41.c:1158:21: error: 'cppi41_runtime_suspend' undeclared here (not in a function)
This removes the #ifdef and instead uses __maybe_unused
annotations that cannot have this problem.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support")
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/cppi41.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c index 499d8f48e030..2f1994ec245f 100644 --- a/drivers/dma/cppi41.c +++ b/drivers/dma/cppi41.c | |||
@@ -1090,8 +1090,7 @@ static int cppi41_dma_remove(struct platform_device *pdev) | |||
1090 | return 0; | 1090 | return 0; |
1091 | } | 1091 | } |
1092 | 1092 | ||
1093 | #ifdef CONFIG_PM_SLEEP | 1093 | static int __maybe_unused cppi41_suspend(struct device *dev) |
1094 | static int cppi41_suspend(struct device *dev) | ||
1095 | { | 1094 | { |
1096 | struct cppi41_dd *cdd = dev_get_drvdata(dev); | 1095 | struct cppi41_dd *cdd = dev_get_drvdata(dev); |
1097 | 1096 | ||
@@ -1102,7 +1101,7 @@ static int cppi41_suspend(struct device *dev) | |||
1102 | return 0; | 1101 | return 0; |
1103 | } | 1102 | } |
1104 | 1103 | ||
1105 | static int cppi41_resume(struct device *dev) | 1104 | static int __maybe_unused cppi41_resume(struct device *dev) |
1106 | { | 1105 | { |
1107 | struct cppi41_dd *cdd = dev_get_drvdata(dev); | 1106 | struct cppi41_dd *cdd = dev_get_drvdata(dev); |
1108 | struct cppi41_channel *c; | 1107 | struct cppi41_channel *c; |
@@ -1127,7 +1126,7 @@ static int cppi41_resume(struct device *dev) | |||
1127 | return 0; | 1126 | return 0; |
1128 | } | 1127 | } |
1129 | 1128 | ||
1130 | static int cppi41_runtime_suspend(struct device *dev) | 1129 | static int __maybe_unused cppi41_runtime_suspend(struct device *dev) |
1131 | { | 1130 | { |
1132 | struct cppi41_dd *cdd = dev_get_drvdata(dev); | 1131 | struct cppi41_dd *cdd = dev_get_drvdata(dev); |
1133 | 1132 | ||
@@ -1136,7 +1135,7 @@ static int cppi41_runtime_suspend(struct device *dev) | |||
1136 | return 0; | 1135 | return 0; |
1137 | } | 1136 | } |
1138 | 1137 | ||
1139 | static int cppi41_runtime_resume(struct device *dev) | 1138 | static int __maybe_unused cppi41_runtime_resume(struct device *dev) |
1140 | { | 1139 | { |
1141 | struct cppi41_dd *cdd = dev_get_drvdata(dev); | 1140 | struct cppi41_dd *cdd = dev_get_drvdata(dev); |
1142 | struct cppi41_channel *c, *_c; | 1141 | struct cppi41_channel *c, *_c; |
@@ -1151,7 +1150,6 @@ static int cppi41_runtime_resume(struct device *dev) | |||
1151 | 1150 | ||
1152 | return 0; | 1151 | return 0; |
1153 | } | 1152 | } |
1154 | #endif | ||
1155 | 1153 | ||
1156 | static const struct dev_pm_ops cppi41_pm_ops = { | 1154 | static const struct dev_pm_ops cppi41_pm_ops = { |
1157 | SET_LATE_SYSTEM_SLEEP_PM_OPS(cppi41_suspend, cppi41_resume) | 1155 | SET_LATE_SYSTEM_SLEEP_PM_OPS(cppi41_suspend, cppi41_resume) |