From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754757AbcKBIpR (ORCPT ); Wed, 2 Nov 2016 04:45:17 -0400 Received: from up.free-electrons.com ([163.172.77.33]:33639 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752550AbcKBIpP (ORCPT ); Wed, 2 Nov 2016 04:45:15 -0400 Date: Wed, 2 Nov 2016 09:44:58 +0100 From: Maxime Ripard To: Chen-Yu Tsai Cc: Liam Girdwood , Mark Brown , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH] ASoC: sun4i-codec: Enable bus clock after getting GPIO Message-ID: <20161102084458.xhuwy5bsmacgs2wm@lukather> References: <20161101063155.15826-1-wens@csie.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="acpdzj2giirnoufn" Content-Disposition: inline In-Reply-To: <20161101063155.15826-1-wens@csie.org> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --acpdzj2giirnoufn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 01, 2016 at 02:31:55PM +0800, Chen-Yu Tsai wrote: > In the current probe function the GPIO is acquired after the codec's > bus clock is enabled. However if it fails to acquire the GPIO due to > a deferred probe, it does not disable the bus clock before bailing out. > This would result in the clock being enabled multiple times. >=20 > Move the code that enables the bus clock after the part that gets the > GPIO, maintaining a separation between resource acquisition and device > enablement in the probe function. >=20 > Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Thanks, Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --acpdzj2giirnoufn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYGaeBAAoJEBx+YmzsjxAgQiIP+gJbAXvDJmlKsNNbuRRP7T2R jEqMtqbA9NZycaaylmpvcS3ZoVxrMe7dkkuuRw2wm6gsh6+jIR6k9hIXsIN6xIxC wXVI0yrdjSw/77ZFCiOVqY5RReJmAqQ/APqCGO2Z0Az/jyPieyiy70dDSksJqU4q 3t9GX0ZlW/20QRYsQvP4uV0uTle4D5eoCtppewi15vsR/xVe4aww9L+XnjeRXR2o bBpV9AtDCBdAAvb/lhtc/+2NKQsZ1YoyXcLgl5/ABVeDnQFTVQm6bzy3vm2d9GEa E3jbVX4rUAkzTA2g2TTMevvQakH5/NkNYoC9P/aCLNVa02Ng6EZwj8VQwVj3ThDm CwCo5kgY+D8hlSUDT7jkmWAz/T9oxbqXFn11FileK4bSKKL6NsOme/YuJpyI4Bfk ST8Ho5FJey+svPKtirGFgI9T80p3y1slt9Hjm7i2bRxvT7+agB6DY0LFZjYIhhkE Xc36EnNpyyFYcAtiov09DwEPLLBJgPxayimHmm2bSsDkjegMLhvyzdN4+WxHZnVe s6t6zonagTsCEQUu+2zNmoksu17j38ZDfQ6otMxt6rnBrOe90xIYOw8XsJTJa34L eUZIWdkfFcDYaR+wPu9QBFDfM+eqdxUx6N8rFIc8ymv00JhiVsjKgEJrBNLWnk9V hT/frduKQ3qcWwy54vjv =nKmT -----END PGP SIGNATURE----- --acpdzj2giirnoufn--