Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753194AbbDTVOk (ORCPT ); Mon, 20 Apr 2015 17:14:40 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:39066 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbbDTVOi (ORCPT ); Mon, 20 Apr 2015 17:14:38 -0400 Date: Mon, 20 Apr 2015 22:14:26 +0100 From: Mark Brown To: Kevin Cernekee Cc: Lars-Peter Clausen , lgirdwood@gmail.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Andrew Bresticker , "linux-kernel@vger.kernel.org" , dgreid@chromium.org, Olof Johansson Message-ID: <20150420211426.GN14892@sirena.org.uk> References: <1429134141-17924-1-git-send-email-cernekee@chromium.org> <1429134141-17924-2-git-send-email-cernekee@chromium.org> <552FB1CD.3040401@metafoo.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Cqq5NadOW2RfLMJ/" Content-Disposition: inline In-Reply-To: X-Cookie: Everyone hates me because I'm paranoid. 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: [alsa-devel] [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers 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 Content-Length: 1864 Lines: 51 --Cqq5NadOW2RfLMJ/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 20, 2015 at 01:56:46PM -0700, Kevin Cernekee wrote: > On Thu, Apr 16, 2015 at 5:57 AM, Lars-Peter Clausen wrote: > > On 04/15/2015 11:42 PM, Kevin Cernekee wrote: > > If you want to make the clock optional use > > if (PTR_ERR(priv->mclk) == -ENOENT) > > return PTR_ERR(priv->mclk); > > This makes sure that the case where the clock is specified, but there is a > > error with the specification (e.g. incorrect DT cells) is handled properly. > Did you mean: > > if (PTR_ERR(priv->mclk) != -ENOENT) > > return PTR_ERR(priv->mclk); > I don't see this in other codec drivers, but I do see the explicit > EPROBE_DEFER check in max98090, max98095, pcm512x, and wm8960. That's the most correct way of writing a check for an optional clock, best practice on this stuff is evolving over time (as is standardization in the clock API). --Cqq5NadOW2RfLMJ/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVNWwxAAoJECTWi3JdVIfQqgcH/0gtcE/F6ufPuDKs6Zu2uk4C 4XAeQTM/2M4nLmPaZrp6RIkCk3faCB6yLJuwnt6UTS+ejBgyeW3JNQ6061g2zM2v /T6aXQ/rht35al8e7vCZa4HZqIG6MVVWu7+9BZ/VurozZVkDlzK7sHfnalVogkaV I4ouUHHN1+rt4HBGXndpl+tPhaeyF3EKXzIC6d1CswUvB4Z5EPoHvKDn+UY31DeA id9csyVm1N3cpwNTzcsImX4G50mC7QzA0hDQd3i6m4O6ju4UGL6nohk6m49ETZPv g2DLZFTCx2s4BgCQnT2kb8wjNOCG55kOBpchGOp3OVse4aAXyweQpByKL6KAfa8= =Z8L5 -----END PGP SIGNATURE----- --Cqq5NadOW2RfLMJ/-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/