From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755380AbcAOR6X (ORCPT ); Fri, 15 Jan 2016 12:58:23 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:56536 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754250AbcAOR6U (ORCPT ); Fri, 15 Jan 2016 12:58:20 -0500 Date: Fri, 15 Jan 2016 17:57:57 +0000 From: Mark Brown To: Wenyou Yang Cc: Liam Girdwood , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Nicolas Ferre , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Message-ID: <20160115175757.GA6588@sirena.org.uk> References: <1452218938-10621-1-git-send-email-wenyou.yang@atmel.com> <1452218938-10621-2-git-send-email-wenyou.yang@atmel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="D3uGefx/nfj0hkMF" Content-Disposition: inline In-Reply-To: <1452218938-10621-2-git-send-email-wenyou.yang@atmel.com> X-Cookie: APL hackers do it in the quad. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 1/2] regulator: act8945a: add regulator driver for ACT8945A 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 --D3uGefx/nfj0hkMF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 08, 2016 at 10:08:57AM +0800, Wenyou Yang wrote: > + np = of_get_child_by_name(pdev->dev.of_node, "regulators"); > + if (!np) { > + dev_err(&pdev->dev, "regulator node not found\n"); > + return -EINVAL; > + } > + > + matches = act8945a_matches; > + num_matches = ARRAY_SIZE(act8945a_matches); > + > + ret = of_regulator_match(&pdev->dev, np, matches, num_matches); Don't open code this, use the core regulators_node and of_match implementation instead. > + dev_info(act8945a_dev->dev, "%s regulator registered\n", > + desc->name); This is just noise, please remove it - let the core handle notifying users. > +static int __init act8945a_pmic_init(void) > +{ > + return platform_driver_register(&act8945a_pmic_driver); > +} > +subsys_initcall(act8945a_pmic_init); Please use module_platform_driver() unless there is a strong reason to do otherwise. --D3uGefx/nfj0hkMF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWmTMkAAoJECTWi3JdVIfQp2MH/i6gR0E1a9xNQf4pFHMn/r2p ZtPLJOLBwpinGwmMkxUjCdKQaSTKsvvyy8AEj8tL7AQ2qbLjxagOfkjd5sqxa5ey BUBRFRcDkDuEpSZvjXV3ualVSftQCPJZzT7jD5WYfWMHGgbbvs5uOhCO6H05Uacx 5KgmA1wIFW48167wvYbGlvDmlKHzKl3U3vAscFnOEwXLS+Th1bPAF9WG1Hf4WOTc OU0NPKCS2objbdKK8ovtzHhipkKjyeHKZOFNKwkTR8IWorR+iTPX6wXjlM/kp6v1 nFCj1Xx6wQVF51PYFqMZ4IyI/x14wA3JJEqbJT4038Y7flOuZxQx9PQJcnnmoTw= =6cFa -----END PGP SIGNATURE----- --D3uGefx/nfj0hkMF--