mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
PM / devfreq: Fix build issues with devfreq disabled
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: 6563f60f14
("drm/msm/gpu: Add devfreq tuning debugfs")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Patchwork: https://patchwork.freedesktop.org/patch/519801/
Link: https://lore.kernel.org/r/20230123153745.3185032-1-robdclark@gmail.com
This commit is contained in:
parent
1d233b1cb1
commit
dbd7a2a941
1 changed files with 2 additions and 5 deletions
|
@ -273,8 +273,8 @@ void devm_devfreq_unregister_notifier(struct device *dev,
|
||||||
struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node);
|
struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node);
|
||||||
struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
|
struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
|
||||||
const char *phandle_name, int index);
|
const char *phandle_name, int index);
|
||||||
|
#endif /* CONFIG_PM_DEVFREQ */
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
|
|
||||||
/**
|
/**
|
||||||
* struct devfreq_simple_ondemand_data - ``void *data`` fed to struct devfreq
|
* struct devfreq_simple_ondemand_data - ``void *data`` fed to struct devfreq
|
||||||
* and devfreq_add_device
|
* and devfreq_add_device
|
||||||
|
@ -292,9 +292,7 @@ struct devfreq_simple_ondemand_data {
|
||||||
unsigned int upthreshold;
|
unsigned int upthreshold;
|
||||||
unsigned int downdifferential;
|
unsigned int downdifferential;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_DEVFREQ_GOV_PASSIVE)
|
|
||||||
enum devfreq_parent_dev_type {
|
enum devfreq_parent_dev_type {
|
||||||
DEVFREQ_PARENT_DEV,
|
DEVFREQ_PARENT_DEV,
|
||||||
CPUFREQ_PARENT_DEV,
|
CPUFREQ_PARENT_DEV,
|
||||||
|
@ -337,9 +335,8 @@ struct devfreq_passive_data {
|
||||||
struct notifier_block nb;
|
struct notifier_block nb;
|
||||||
struct list_head cpu_data_list;
|
struct list_head cpu_data_list;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
#else /* !CONFIG_PM_DEVFREQ */
|
#if !defined(CONFIG_PM_DEVFREQ)
|
||||||
static inline struct devfreq *devfreq_add_device(struct device *dev,
|
static inline struct devfreq *devfreq_add_device(struct device *dev,
|
||||||
struct devfreq_dev_profile *profile,
|
struct devfreq_dev_profile *profile,
|
||||||
const char *governor_name,
|
const char *governor_name,
|
||||||
|
|
Loading…
Add table
Reference in a new issue