Re: [PATCH v8 5/5] regulator: RK808: Remove pdata from the regulator

From: Doug Anderson
Date: Wed Sep 03 2014 - 17:51:44 EST


Chris,

On Wed, Sep 3, 2014 at 10:06 AM, Chris Zhong <zyw@xxxxxxxxxxxxxx> wrote:
> Signed-off-by: Chris Zhong <zyw@xxxxxxxxxxxxxx>
>
> Tested-by: Heiko <heiko@xxxxxxxxx>
> ---
>
> 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
--
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/