From 329fa1f088abe7ab36cb4374a059c0c1a841f8bc Mon Sep 17 00:00:00 2001 From: "xsf@rock-chips.com" Date: Tue, 26 Jul 2011 18:05:42 +0800 Subject: [PATCH] phonesdk: slove the warnimg that the gpio used but not request --- drivers/regulator/wm831x-dcdc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index 42112f9ca011..275fd7ad7ce7 100755 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers/regulator/wm831x-dcdc.c @@ -318,7 +318,6 @@ static int wm831x_buckv_set_dvs(struct regulator_dev *rdev, int state) int wm831x_reg_read(struct wm831x *wm831x, unsigned short reg); static int wm831x_buckv_read_voltage(struct regulator_dev *rdev) { - u16 r; int vol_read; int ret; struct wm831x_dcdc *dcdc = rdev_get_drvdata(rdev); @@ -329,7 +328,6 @@ static int wm831x_buckv_read_voltage(struct regulator_dev *rdev) if (ret < 0) return ret; ret &= WM831X_DC1_ON_VSEL_MASK; - //printk("-readvoltage--%d---\n", ret); vol_read = (ret-8)*12500 + 600000; return vol_read; @@ -357,8 +355,6 @@ static int wm831x_buckv_set_voltage(struct regulator_dev *rdev, if (dcdc->dvs_gpio && dcdc->dvs_vsel == vsel) return wm831x_buckv_set_dvs(rdev, 1); -// printk("min_uV = %d\n", min_uV); -// printk("vsel = %d\n", vsel); /* Always set the ON status to the minimum voltage */ ret = wm831x_set_bits(wm831x, on_reg, WM831X_DC1_ON_VSEL_MASK, vsel); if (ret < 0) @@ -433,8 +429,7 @@ static int wm831x_buckv_set_voltage_step(struct regulator_dev * rdev, int min_uV int old_vol; int new_min_uV,new_max_uV; int diff_value,step; - int ret; - int read_vol; + int ret=0; struct wm831x_dcdc *dcdc = rdev_get_drvdata(rdev); struct wm831x *wm831x = dcdc->wm831x; @@ -479,7 +474,6 @@ static int wm831x_buckv_set_voltage_step(struct regulator_dev * rdev, int min_uV else //rise voltage { diff_value = (min_uV- old_vol); - gpio_direction_output(RK29_PIN1_PD7, GPIO_HIGH); for(step = 100000; step<=diff_value; step += 100000) { -- 2.34.1