mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-02 03:03:00 +09:00
cpufreq: dt: Fix memory leak when cpu on/off
Fixes: e51ed31ccd ("cpufreq: dt: Add support to get static power")
Change-Id: I613a14a061490fb69e913b8c2cf6677757c73ced
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
@@ -15,17 +15,16 @@ struct ipa_power_model_data {
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ROCKCHIP_IPA
|
||||
int rockchip_ipa_power_model_init(struct device *dev, char *lkg_name,
|
||||
struct ipa_power_model_data **data);
|
||||
struct ipa_power_model_data *rockchip_ipa_power_model_init(struct device *dev,
|
||||
char *lkg_name);
|
||||
unsigned long
|
||||
rockchip_ipa_get_static_power(struct ipa_power_model_data *model_data,
|
||||
unsigned long voltage_mv);
|
||||
#else
|
||||
static inline int
|
||||
rockchip_ipa_power_model_init(struct device *dev, char *lkg_name,
|
||||
struct ipa_power_model_data **data)
|
||||
static inline struct ipa_power_model_data *
|
||||
rockchip_ipa_power_model_init(struct device *dev, char *lkg_name)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
return ERR_PTR(-ENOTSUPP);
|
||||
};
|
||||
|
||||
static inline unsigned long
|
||||
|
||||
Reference in New Issue
Block a user