Skip to content

Commit 5446585

Browse files
robclarkgregkh
authored andcommitted
PM / devfreq: Fix build issues with devfreq disabled
commit dbd7a2a941b8cbf9e5f79a777ed9fe0090eebb61 upstream. The existing no-op shims for when PM_DEVFREQ (or an individual governor) only do half the job. The governor specific config/tuning structs need to be available to avoid compile errors in drivers using devfreq. Fixes: 6563f60f14cb ("drm/msm/gpu: Add devfreq tuning debugfs") Signed-off-by: Rob Clark <[email protected]> Acked-by: MyungJoo Ham <[email protected]> Acked-by: Chanwoo Choi <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/519801/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a08c1f1 commit 5446585

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

include/linux/devfreq.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ void devm_devfreq_unregister_notifier(struct device *dev,
273273
struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node);
274274
struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
275275
const char *phandle_name, int index);
276+
#endif /* CONFIG_PM_DEVFREQ */
276277

277-
#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
278278
/**
279279
* struct devfreq_simple_ondemand_data - ``void *data`` fed to struct devfreq
280280
* and devfreq_add_device
@@ -292,9 +292,7 @@ struct devfreq_simple_ondemand_data {
292292
unsigned int upthreshold;
293293
unsigned int downdifferential;
294294
};
295-
#endif
296295

297-
#if IS_ENABLED(CONFIG_DEVFREQ_GOV_PASSIVE)
298296
enum devfreq_parent_dev_type {
299297
DEVFREQ_PARENT_DEV,
300298
CPUFREQ_PARENT_DEV,
@@ -337,9 +335,8 @@ struct devfreq_passive_data {
337335
struct notifier_block nb;
338336
struct list_head cpu_data_list;
339337
};
340-
#endif
341338

342-
#else /* !CONFIG_PM_DEVFREQ */
339+
#if !defined(CONFIG_PM_DEVFREQ)
343340
static inline struct devfreq *devfreq_add_device(struct device *dev,
344341
struct devfreq_dev_profile *profile,
345342
const char *governor_name,

0 commit comments

Comments
 (0)