From eb6c2ed7207f4dd086548dd58589ed4ea042504f Mon Sep 17 00:00:00 2001
From: chenzhen <chenzhen@rock-chips.com>
Date: Fri, 30 Dec 2016 19:56:42 +0800
Subject: [PATCH] Revert "MALI: midgard: support sharing regulator with other
 devices"

This reverts commit 85b4e1dffa2e7a0bbd092d294043f19f82417d74.

Change-Id: Ie8fb980cb8a8b063dd6c9626d5b6c858b36f0976
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
---
 drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c b/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c
index 083810f853ae..fd3c1f58a7d4 100644
--- a/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c
+++ b/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c
@@ -76,7 +76,7 @@ kbase_devfreq_target(struct device *dev, unsigned long *target_freq, u32 flags)
 #ifdef CONFIG_REGULATOR
 		if (kbdev->current_voltage == voltage)
 			return 0;
-		err = regulator_set_voltage(kbdev->regulator, voltage, INT_MAX);
+		err = regulator_set_voltage(kbdev->regulator, voltage, voltage);
 		if (err) {
 			dev_err(dev, "Failed to set voltage (%d)\n", err);
 			return err;
@@ -89,7 +89,7 @@ kbase_devfreq_target(struct device *dev, unsigned long *target_freq, u32 flags)
 #ifdef CONFIG_REGULATOR
 	if (kbdev->regulator && kbdev->current_voltage != voltage &&
 	    old_freq < freq) {
-		err = regulator_set_voltage(kbdev->regulator, voltage, INT_MAX);
+		err = regulator_set_voltage(kbdev->regulator, voltage, voltage);
 		if (err) {
 			dev_err(dev, "Failed to increase voltage (%d)\n", err);
 			return err;
@@ -113,7 +113,7 @@ kbase_devfreq_target(struct device *dev, unsigned long *target_freq, u32 flags)
 #ifdef CONFIG_REGULATOR
 	if (kbdev->regulator && kbdev->current_voltage != voltage &&
 	    old_freq > freq) {
-		err = regulator_set_voltage(kbdev->regulator, voltage, INT_MAX);
+		err = regulator_set_voltage(kbdev->regulator, voltage, voltage);
 		if (err) {
 			dev_err(dev, "Failed to decrease voltage (%d)\n", err);
 			return err;
-- 
2.34.1