From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933251AbbIYUKU (ORCPT ); Fri, 25 Sep 2015 16:10:20 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:50558 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932965AbbIYUKS (ORCPT ); Fri, 25 Sep 2015 16:10:18 -0400 Subject: Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC To: Mark Brown References: <1443106374-4126-1-git-send-email-afd@ti.com> <1443106374-4126-5-git-send-email-afd@ti.com> <20150925180533.GN30445@sirena.org.uk> CC: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Lee Jones , Linus Walleij , Alexandre Courbot , Samuel Ortiz , Liam Girdwood , , , From: "Andrew F. Davis" Message-ID: <5605AA1C.3090905@ti.com> Date: Fri, 25 Sep 2015 15:10:04 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150925180533.GN30445@sirena.org.uk> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?