Commit 5faaa035ddc16d3d2e31c0bfc1c4756b6869dbcc
Committed by
Rafael J. Wysocki
1 parent
0f70306929
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
PM / devfreq: Fix compiler warnings for CONFIG_PM_DEVFREQ unset
Fix compiler warnings generated when devfreq is not enabled (CONFIG_PM_DEVFREQ is not set). Signed-off-by: Rajagopal Venkat <rajagopal.venkat@linaro.org> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing 1 changed file with 8 additions and 8 deletions Side-by-side Diff
include/linux/devfreq.h
... | ... | @@ -213,7 +213,7 @@ |
213 | 213 | #endif |
214 | 214 | |
215 | 215 | #else /* !CONFIG_PM_DEVFREQ */ |
216 | -static struct devfreq *devfreq_add_device(struct device *dev, | |
216 | +static inline struct devfreq *devfreq_add_device(struct device *dev, | |
217 | 217 | struct devfreq_dev_profile *profile, |
218 | 218 | const char *governor_name, |
219 | 219 | void *data) |
220 | 220 | |
221 | 221 | |
222 | 222 | |
223 | 223 | |
224 | 224 | |
225 | 225 | |
... | ... | @@ -221,34 +221,34 @@ |
221 | 221 | return NULL; |
222 | 222 | } |
223 | 223 | |
224 | -static int devfreq_remove_device(struct devfreq *devfreq) | |
224 | +static inline int devfreq_remove_device(struct devfreq *devfreq) | |
225 | 225 | { |
226 | 226 | return 0; |
227 | 227 | } |
228 | 228 | |
229 | -static int devfreq_suspend_device(struct devfreq *devfreq) | |
229 | +static inline int devfreq_suspend_device(struct devfreq *devfreq) | |
230 | 230 | { |
231 | 231 | return 0; |
232 | 232 | } |
233 | 233 | |
234 | -static int devfreq_resume_device(struct devfreq *devfreq) | |
234 | +static inline int devfreq_resume_device(struct devfreq *devfreq) | |
235 | 235 | { |
236 | 236 | return 0; |
237 | 237 | } |
238 | 238 | |
239 | -static struct opp *devfreq_recommended_opp(struct device *dev, | |
239 | +static inline struct opp *devfreq_recommended_opp(struct device *dev, | |
240 | 240 | unsigned long *freq, u32 flags) |
241 | 241 | { |
242 | - return -EINVAL; | |
242 | + return ERR_PTR(-EINVAL); | |
243 | 243 | } |
244 | 244 | |
245 | -static int devfreq_register_opp_notifier(struct device *dev, | |
245 | +static inline int devfreq_register_opp_notifier(struct device *dev, | |
246 | 246 | struct devfreq *devfreq) |
247 | 247 | { |
248 | 248 | return -EINVAL; |
249 | 249 | } |
250 | 250 | |
251 | -static int devfreq_unregister_opp_notifier(struct device *dev, | |
251 | +static inline int devfreq_unregister_opp_notifier(struct device *dev, | |
252 | 252 | struct devfreq *devfreq) |
253 | 253 | { |
254 | 254 | return -EINVAL; |