Messages in this thread | | | Date | Wed, 3 Sep 2014 14:51:38 -0700 | Subject | Re: [PATCH v8 5/5] regulator: RK808: Remove pdata from the regulator | From | Doug Anderson <> |
| |
Chris,
On Wed, Sep 3, 2014 at 10:06 AM, Chris Zhong <zyw@rock-chips.com> wrote: > Signed-off-by: Chris Zhong <zyw@rock-chips.com> > > Tested-by: Heiko <heiko@sntech.de> > --- > > Changes in v8: > Adviced by Doug > - remove rk808_regulator_dts() function > - remove the check about "client->dev.of_node"
Nice, this cleaned this up a lot. Thanks!
> static int rk808_regulator_probe(struct platform_device *pdev) > { > struct rk808 *rk808 = dev_get_drvdata(pdev->dev.parent); > struct i2c_client *client = rk808->i2c; > - struct rk808_board *pdata = dev_get_platdata(&client->dev); > struct regulator_config config = {}; > struct regulator_dev *rk808_rdev; > - struct regulator_init_data *reg_data; > - int i = 0;
As Heiko mentioned, you need "struct device_node *np, *reg_np;" here.
> int ret = 0; > + int i = 0;
nit: I think neither "ret" nor "i" needs to be initted here.
Otherwise I agree that this looks really good!
-Doug
| |