MALI: midgard: RK: fix compiling fail without CONFIG_REGULATOR defined
authorchenzhen <chenzhen@rock-chips.com>
Thu, 1 Sep 2016 08:16:15 +0000 (16:16 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 1 Sep 2016 13:00:59 +0000 (21:00 +0800)
Change-Id: I4eb6fcae00d934c1fc2cbffc888a88c2fda9c22d
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c

index f7c0a66e3879b43bf4229a048fbcdcf56821797c..bcf7971a5fdb8270f591bade1fa75eb28207be01 100644 (file)
 
 /*---------------------------------------------------------------------------*/
 
+#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)
 {