You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
MALI: rockchip: Fix build warning after disable CONFIG_PM
Change-Id: I23002ed6814f4dcdd3f071411907df9328f886b5 Signed-off-by: Li Huang <putin.li@rock-chips.com>
This commit is contained in:
@@ -201,7 +201,7 @@ struct kbase_platform_funcs_conf platform_funcs = {
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
static int rk_pm_callback_runtime_on(struct kbase_device *kbdev)
|
||||
static __maybe_unused int rk_pm_callback_runtime_on(struct kbase_device *kbdev)
|
||||
{
|
||||
struct rockchip_opp_info *opp_info = &kbdev->opp_info;
|
||||
int ret = 0;
|
||||
@@ -226,7 +226,7 @@ static int rk_pm_callback_runtime_on(struct kbase_device *kbdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void rk_pm_callback_runtime_off(struct kbase_device *kbdev)
|
||||
static __maybe_unused void rk_pm_callback_runtime_off(struct kbase_device *kbdev)
|
||||
{
|
||||
struct rockchip_opp_info *opp_info = &kbdev->opp_info;
|
||||
|
||||
@@ -310,29 +310,22 @@ static void rk_pm_callback_power_off(struct kbase_device *kbdev)
|
||||
msecs_to_jiffies(platform->delay_ms));
|
||||
}
|
||||
|
||||
static int rk_kbase_device_runtime_init(struct kbase_device *kbdev)
|
||||
static __maybe_unused int rk_kbase_device_runtime_init(struct kbase_device *kbdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void rk_kbase_device_runtime_disable(struct kbase_device *kbdev)
|
||||
static __maybe_unused void rk_kbase_device_runtime_disable(struct kbase_device *kbdev)
|
||||
{
|
||||
}
|
||||
|
||||
struct kbase_pm_callback_conf pm_callbacks = {
|
||||
.power_on_callback = rk_pm_callback_power_on,
|
||||
.power_off_callback = rk_pm_callback_power_off,
|
||||
#ifdef CONFIG_PM
|
||||
.power_runtime_init_callback = rk_kbase_device_runtime_init,
|
||||
.power_runtime_term_callback = rk_kbase_device_runtime_disable,
|
||||
.power_runtime_on_callback = rk_pm_callback_runtime_on,
|
||||
.power_runtime_off_callback = rk_pm_callback_runtime_off,
|
||||
#else /* CONFIG_PM */
|
||||
.power_runtime_init_callback = NULL,
|
||||
.power_runtime_term_callback = NULL,
|
||||
.power_runtime_on_callback = NULL,
|
||||
.power_runtime_off_callback = NULL,
|
||||
#endif /* CONFIG_PM */
|
||||
.power_runtime_init_callback = pm_ptr(rk_kbase_device_runtime_init),
|
||||
.power_runtime_term_callback = pm_ptr(rk_kbase_device_runtime_disable),
|
||||
.power_runtime_on_callback = pm_ptr(rk_pm_callback_runtime_on),
|
||||
.power_runtime_off_callback = pm_ptr(rk_pm_callback_runtime_off),
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
@@ -404,7 +404,6 @@ static int power_model_simple_init(struct platform_device *pdev)
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
static int rk_platform_enable_clk_gpu(struct device *dev)
|
||||
{
|
||||
@@ -516,6 +515,7 @@ void rk_platform_uninit_opp_table(struct mali_device *mdev)
|
||||
rockchip_uninit_opp_table(mdev->dev, &mdev->opp_info);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int mali_runtime_suspend(struct device *device)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
@@ -169,12 +169,12 @@ struct kbase_platform_funcs_conf platform_funcs = {
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
static int rk_pm_callback_runtime_on(struct kbase_device *kbdev)
|
||||
static __maybe_unused int rk_pm_callback_runtime_on(struct kbase_device *kbdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void rk_pm_callback_runtime_off(struct kbase_device *kbdev)
|
||||
static __maybe_unused void rk_pm_callback_runtime_off(struct kbase_device *kbdev)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -248,17 +248,10 @@ void rk_kbase_device_runtime_disable(struct kbase_device *kbdev)
|
||||
struct kbase_pm_callback_conf pm_callbacks = {
|
||||
.power_on_callback = rk_pm_callback_power_on,
|
||||
.power_off_callback = rk_pm_callback_power_off,
|
||||
#ifdef CONFIG_PM
|
||||
.power_runtime_init_callback = rk_kbase_device_runtime_init,
|
||||
.power_runtime_term_callback = rk_kbase_device_runtime_disable,
|
||||
.power_runtime_on_callback = rk_pm_callback_runtime_on,
|
||||
.power_runtime_off_callback = rk_pm_callback_runtime_off,
|
||||
#else /* CONFIG_PM */
|
||||
.power_runtime_init_callback = NULL,
|
||||
.power_runtime_term_callback = NULL,
|
||||
.power_runtime_on_callback = NULL,
|
||||
.power_runtime_off_callback = NULL,
|
||||
#endif /* CONFIG_PM */
|
||||
.power_runtime_init_callback = pm_ptr(rk_kbase_device_runtime_init),
|
||||
.power_runtime_term_callback = pm_ptr(rk_kbase_device_runtime_disable),
|
||||
.power_runtime_on_callback = pm_ptr(rk_pm_callback_runtime_on),
|
||||
.power_runtime_off_callback = pm_ptr(rk_pm_callback_runtime_off),
|
||||
};
|
||||
|
||||
int kbase_platform_early_init(void)
|
||||
|
||||
Reference in New Issue
Block a user