On Tue, Sep 15, 2015 at 03:33:55PM +0200, Thomas Elste wrote: > +static struct regulator_init_data* > + of_get_tps65023_platform_data(struct device *dev) > +{ > + struct regulator_init_data *reg_data; > + struct device_node *np = dev->of_node; > + struct device_node *regulators; > + struct of_regulator_match *matches; > + int idx, count, ret; > + > + regulators = of_get_child_by_name(np, "regulators"); > + if (!regulators) { > + dev_err(dev, "Regulator node not found\n"); > + return NULL; > + } There's now core support for this so no need to open code in the driver - set of_match and regulators_node in the regulator_desc instead.
Attachment:
signature.asc
Description: Digital signature