From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932870AbbIYSGc (ORCPT ); Fri, 25 Sep 2015 14:06:32 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:49769 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932764AbbIYSGa (ORCPT ); Fri, 25 Sep 2015 14:06:30 -0400 Date: Fri, 25 Sep 2015 11:05:33 -0700 From: Mark Brown To: "Andrew F. Davis" Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Lee Jones , Linus Walleij , Alexandre Courbot , Samuel Ortiz , Liam Girdwood , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <20150925180533.GN30445@sirena.org.uk> References: <1443106374-4126-1-git-send-email-afd@ti.com> <1443106374-4126-5-git-send-email-afd@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iym2iLi12j4kk03o" Content-Disposition: inline In-Reply-To: <1443106374-4126-5-git-send-email-afd@ti.com> X-Cookie: NOBODY EXPECTS THE SPANISH INQUISITION! User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 70.35.39.2 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --iym2iLi12j4kk03o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. Please also use subject lines mathcing the style for the subsystem. --iym2iLi12j4kk03o Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWBYzsAAoJECTWi3JdVIfQIjUH/igUNLPhNPkPVL5uY/fWMsxh i1H+ayv2p/GzZPaPHvAenZc8jzqXjFaTkzNmhhggoSHypfubvxi9833NH93j9t2e zNHD9deFHCdLtB6truqIpYODQGAMcnerno4Ba/0unDOROTWPxPAkazY8YmO6STHz r6TNFWNYJl0JityJ/DXj/FC3TRZJ/VbgvNxv6qdxXo9cwhCBOXCMiAoxUMOVIKXg mM4I29R9QQ46R2lBrG7WKYNHGW0ayuQ5tTZuTK7oPwd0A5eYoFsuqVaiuRS7PL1u wD+yFA6v29A5EjeoomRpySVTXPaaLhoNgvJW4DdP9T9uXfpuXO6KqFc6pLH5Mhk= =ZFLK -----END PGP SIGNATURE----- --iym2iLi12j4kk03o--