From: chenzhen Date: Thu, 1 Sep 2016 08:16:15 +0000 (+0800) Subject: MALI: midgard: RK: fix compiling fail without CONFIG_REGULATOR defined X-Git-Tag: firefly_0821_release~1613 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=46b99d8fb3f0d044a56ebafe8d66777d4a0dc3ce;p=firefly-linux-kernel-4.4.55.git MALI: midgard: RK: fix compiling fail without CONFIG_REGULATOR defined Change-Id: I4eb6fcae00d934c1fc2cbffc888a88c2fda9c22d Signed-off-by: chenzhen --- diff --git a/drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c b/drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c index f7c0a66e3879..bcf7971a5fdb 100644 --- a/drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c +++ b/drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c @@ -42,9 +42,18 @@ /*---------------------------------------------------------------------------*/ +#ifdef CONFIG_REGULATOR static int rk_pm_enable_regulator(struct kbase_device *kbdev); - static void rk_pm_disable_regulator(struct kbase_device *kbdev); +#else +static inline int rk_pm_enable_regulator(struct kbase_device *kbdev) +{ + return 0; +} +static inline void rk_pm_disable_regulator(struct kbase_device *kbdev) +{ +} +#endif static int rk_pm_enable_clk(struct kbase_device *kbdev); @@ -249,6 +258,7 @@ void kbase_platform_rk_shutdown(struct kbase_device *kbdev) /*---------------------------------------------------------------------------*/ +#ifdef CONFIG_REGULATOR static int rk_pm_enable_regulator(struct kbase_device *kbdev) { int ret = 0; @@ -279,6 +289,7 @@ static void rk_pm_disable_regulator(struct kbase_device *kbdev) D("to disable regulator."); regulator_disable(kbdev->regulator); } +#endif static int rk_pm_enable_clk(struct kbase_device *kbdev) {