Re: [PATCH RFT 3/4] regulator: wm831x-dcdc: Convert wm831x_buckv_opsto set_voltage_sel and map_voltage

From: Axel Lin
Date: Wed Jun 13 2012 - 07:41:41 EST


2012/6/13 Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>:
> On Tue, Jun 12, 2012 at 10:23:09AM +0800, Axel Lin wrote:
>> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
>
> This patch is way more invasive than it needs to be (and therefore hard
> to check) because
>
>> -     if (dcdc->dvs_gpio && dcdc->on_vsel == vsel)
>> +     if (dcdc->dvs_gpio && dcdc->on_vsel == selector)
>
> you've replaced vsel with selector throughout the code.

Sorry. I don't get it.

In wm831x_buckv_set_voltage(), we call
wm831x_buckv_select_min_voltage() to get the selector ( named vsel).

In this patch, now we convert to set_voltage_sel:

static int wm831x_buckv_set_voltage_sel(struct regulator_dev *rdev,
unsigned selector)

So the selector now named 'selector'.


Or do you prefer I chenge the prototype to:

static int wm831x_buckv_set_voltage_sel(struct regulator_dev *rdev,
unsigned vsel)

Then the diff can be smaller.

Regards,
Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/