Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752738AbdC1PZk (ORCPT ); Tue, 28 Mar 2017 11:25:40 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:50596 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751600AbdC1PZi (ORCPT ); Tue, 28 Mar 2017 11:25:38 -0400 Date: Tue, 28 Mar 2017 16:24:57 +0100 From: Mark Brown To: Charles Keepax Cc: Daniel Baluta , Daniel Baluta , Nicolin Chen , alsa-devel@alsa-project.org, Timur Tabi , Xiubo.Lee@gmail.com, Linux Kernel Mailing List , Liam Girdwood , Takashi Iwai , fabio.estevam@nxp.com, linuxppc-dev@lists.ozlabs.org Message-ID: <20170328152457.2j5zaxdbdavpuspa@sirena.org.uk> References: <1490691532-2086-1-git-send-email-daniel.baluta@nxp.com> <1490691532-2086-3-git-send-email-daniel.baluta@nxp.com> <20170328092103.GQ6986@localhost.localdomain> <20170328115306.GR6986@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="snmk5xbbpahugqfp" Content-Disposition: inline In-Reply-To: <20170328115306.GR6986@localhost.localdomain> X-Cookie: No shirt, no shoes, no service. User-Agent: NeoMutt/20161126 (1.7.1) X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [alsa-devel] [PATCH v3 2/2] ASoC: imx-wm8962: Fix codec_clk cleanup X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1434 Lines: 39 --snmk5xbbpahugqfp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 28, 2017 at 12:53:06PM +0100, Charles Keepax wrote: > On Tue, Mar 28, 2017 at 01:47:04PM +0300, Daniel Baluta wrote: > > >> - codec_clk = devm_clk_get(&codec_dev->dev, NULL); > > >> + codec_clk = clk_get(&codec_dev->dev, NULL); > > is different from &codec_dev->dev. > I get that they are different, I just don't get why changing > from a devm_clk_get to a clk_get is a better fix than changing > &codec->dev to &pdev->dev. This should be clear from the semantics of clk_get(): you're looking up the clock in the context of the supplied device and the clock is attached to the CODEC so you need to look up in the CODEC context. What would be even better would be to move the allocation of the clock into the CODEC driver... --snmk5xbbpahugqfp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAljagEgACgkQJNaLcl1U h9AKugf/StJ149lY5qxFIidYO0Ivx0sfdE0kKrP8LJee5gI9llEg3gLIetZ/Zdw8 7aVlTFxfD/l8U2ym9TUbfVVbu4Aj7oruKkw1zGiMlpoHzzTNSYKXvNP7gPA/8UCp 5q8Y+vrW2zAwoprvvPfKZefn2RhZ44ts1F3kDDiX9MMQIOx/xBZFaDcWBg4SuFxR FA8nKooE/4Fj9H0//eBgoQBePR9wZaMBeYskRy0IJZskTyPaMr6kheLe4aoTmiNC XWe6oAAkTdx0Vi4hYcu6PLmqyof1TUiuBONt/hANqJLgQTBrN0B5w3HlaFnmGCAd 5FQwg2ng+ONbILs5V4JjunNpcKzx4A== =c1d6 -----END PGP SIGNATURE----- --snmk5xbbpahugqfp--