MALI: midgard: RK: fix compiling fail without CONFIG_REGULATOR defined
[firefly-linux-kernel-4.4.55.git] / 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)
 {