On 09/25/2015 01:05 PM, Mark Brown wrote:
On Thu, Sep 24, 2015 at 09:52:53AM -0500, Andrew F. Davis wrote:+static int tps65912_regulator_probe(struct platform_device *pdev) +{ + struct tps65912 *tps = dev_get_drvdata(pdev->dev.parent); + struct regulator_init_data *init_data; + const struct tps_info *template; + struct regulator_dev *rdev; + const struct of_device_id *match; + struct regulator_config config = { }; + int id; + + match = of_match_device(tps65912_regulator_of_match_table, &pdev->dev); + if (!match) + return -ENODEV; + + template = match->data; + id = template->id; + init_data = of_get_regulator_init_data(&pdev->dev, pdev->dev.of_node, + ®ulators[id]);Don't open code this stuff, use the core DT matching in the regulator_desc instead.
I assume you are referring to your additions in a0c7b164ad11? If so I'm not sure that will save me anything as my probe function is called with a DT match already, so no searching is needed.
Please also use subject lines mathcing the style for the subsystem.
I'm not sure I know what you mean? What is wrong with my subject line, it looks like the others I've looked at? -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
