From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966492AbbBCQZr (ORCPT ); Tue, 3 Feb 2015 11:25:47 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:49323 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932332AbbBCQZp (ORCPT ); Tue, 3 Feb 2015 11:25:45 -0500 Date: Tue, 3 Feb 2015 16:25:37 +0000 From: Mark Brown To: Jaewon Kim Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, Inki Dae , SangBae Lee , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Lee Jones , Chanwoo Choi , Sebastian Reichel , Beomho Seo Message-ID: <20150203162536.GQ21293@sirena.org.uk> References: <1422939846-29955-1-git-send-email-jaewon02.kim@samsung.com> <1422939846-29955-6-git-send-email-jaewon02.kim@samsung.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PdA1PHnkxfF9WYwU" Content-Disposition: inline In-Reply-To: <1422939846-29955-6-git-send-email-jaewon02.kim@samsung.com> X-Cookie: My LESLIE GORE record is BROKEN ... User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v2 5/6] regulator: max77843: Add max77843 regulator driver 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 --PdA1PHnkxfF9WYwU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Feb 03, 2015 at 02:04:05PM +0900, Jaewon Kim wrote: > This patch adds new regulator driver to support max77843 > MFD(Multi Function Device) chip`s regulators. > The Max77843 has two voltage regulators for USB safeout. This looks mostly good, a couple of very small things: > +static const struct regulator_desc max77843_supported_regulators[] = { > + [MAX77843_SAFEOUT1] = { > + .name = "SAFEOUT1", > + .id = MAX77843_SAFEOUT1, > + .ops = &max77843_regulator_ops, > + .of_match = of_match_ptr("SAFEOUT1"), > + .regulators_node = of_match_ptr("regulators"), > + .type = REGULATOR_VOLTAGE, > + .owner = THIS_MODULE, > + .n_voltages = MAX77843_SUPPORTED_VOLTAGE_NUM, > + .volt_table = max77843_regulator_table, It's better to make n_voltages be ARRAY_SIZE() for the table, that way there's no need to keep the define and array lined up if someone extends the driver. A name like _safeout_voltage_table might be clearer too. --PdA1PHnkxfF9WYwU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU0PaAAAoJECTWi3JdVIfQz8kH/ijvmoKtCPg7Ju1PeSNkLlTr k8Oy4+rK55JMvKEWE4F++7e6q6BLKMrKx98TV+VlrXnGt9POxadtRfJaGvYQrDS7 coAocT8y5jtrEFzIMBIBxfq8QRoBSxORmaEjV+oyIT5w5gBvkH+Efd3KEGydQXRS KPjjdfYklBACgwnEhElUVz66McP1rwP++7ynS5JuFdfaP0pBSapfA1NEPi7F8ulh j6eOGqfKIXfN09QZA/jMzlIYF0szWV3FAa7YjEqiDpK6OQepZB3OfZaRXyq9Gr7U 6l/vWQb2EZKlwJtELqTkom8/XgFKbKeJuCR26mfDbhnH5MmVW21w4w07bPVT/PQ= =mIjx -----END PGP SIGNATURE----- --PdA1PHnkxfF9WYwU--