From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757257AbbGGNdI (ORCPT ); Tue, 7 Jul 2015 09:33:08 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:42825 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756969AbbGGNdA (ORCPT ); Tue, 7 Jul 2015 09:33:00 -0400 Date: Tue, 7 Jul 2015 14:32:45 +0100 From: Mark Brown To: Lee Jones Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, lgirdwood@gmail.com Message-ID: <20150707133245.GM2887@sirena.org.uk> References: <1436173112-21397-1-git-send-email-lee.jones@linaro.org> <1436173112-21397-10-git-send-email-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Cqq5NadOW2RfLMJ/" Content-Disposition: inline In-Reply-To: <1436173112-21397-10-git-send-email-lee.jones@linaro.org> X-Cookie: Only fools are quoted. User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 91.125.27.234 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [RESEND 09/10] regulator: pwm-regulator: Simplify voltage to duty-cycle call 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 --Cqq5NadOW2RfLMJ/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jul 06, 2015 at 09:58:31AM +0100, Lee Jones wrote: > If we reverse some of the logic and change the formula used, > we can simplify the function greatly. > +static int pwm_voltage_to_duty_cycle(struct regulator_dev *rdev, int req_uV) > { > - struct pwm_regulator_data *drvdata = rdev_get_drvdata(rdev); You just added this function in the previous patch? --Cqq5NadOW2RfLMJ/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVm9T9AAoJECTWi3JdVIfQRw4H/14LDYPLzxwojMV7fxmfraOo mISVHve+fzQz82jI5sisUPeb0FLa+Iv0p1mnazFnAF8mg8LCGcRl35EuI62u4ArQ aLlFuXMYQssrB1fadmyD/j4IOOYoPyPcnsa5p9Z6osnwMR1wsgD1yOYCHVDcNxyy 18+ZZWosF8gdfpbf26zi5T5H/3cXRbNebyF/0lED8gB1Vo0fi1K9Q63KyH+crCmY RReIavw4bws5yfYyqtnCOzcw1aWElLfaYmJ3wPAhgllsyWMmd/Mf6Wp4HkF1VR7k aC6K+iz4Bum//AfH2uQ9kID0OrcWl7tyYdrF7OZTcXCGeEkS4RWW/R44ythjWW4= =Xzph -----END PGP SIGNATURE----- --Cqq5NadOW2RfLMJ/--