From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753498AbcG3PVG (ORCPT ); Sat, 30 Jul 2016 11:21:06 -0400 Received: from down.free-electrons.com ([37.187.137.238]:33572 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753335AbcG3PUv (ORCPT ); Sat, 30 Jul 2016 11:20:51 -0400 Date: Sat, 30 Jul 2016 17:20:49 +0200 From: "maxime.ripard@free-electrons.com" To: Icenowy Zheng Cc: "codekipper@gmail.com" , "alsa-devel@alsa-project.org" , "lgirdwood@gmail.com" , "linux-kernel@vger.kernel.org" , "be17068@iperbole.bo.it" , "linux-sunxi@googlegroups.com" , "broonie@kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH 2/2] ASoC: sunxi: compatibility for sun6i to SPDIF Message-ID: <20160730152049.GU6215@lukather> References: <20160730142716.29377-1-codekipper@gmail.com> <20160730142716.29377-3-codekipper@gmail.com> <170941469890365@web9j.yandex.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="b9dEYEwnDXkv9lSy" Content-Disposition: inline In-Reply-To: <170941469890365@web9j.yandex.ru> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --b9dEYEwnDXkv9lSy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 30, 2016 at 10:52:45PM +0800, Icenowy Zheng wrote: > > + if (of_device_is_compatible(pdev->dev.of_node, > > + "allwinner,sun6i-a31-spdif")) { > > + host->rst =3D devm_reset_control_get_optional(&pdev->dev, NULL); > > + if (IS_ERR(host->rst) && PTR_ERR(host->rst) =3D=3D -EPROBE_DEFER) { > > + ret =3D -EPROBE_DEFER; > > + dev_err(&pdev->dev, "Failed to get reset: %d\n", ret); > > + goto err_disable_apb_clk; > > + } > > + if (!IS_ERR(host->rst)) > > + reset_control_deassert(host->rst); > > + } > > + > I think you do not need the compatible. > You can just detect whether the reset is present. That would weaken the error check. If we're running on the A31 and are missing our reset property, it would go unnoticed. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --b9dEYEwnDXkv9lSy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXnMXRAAoJEBx+YmzsjxAgkGEQALL3ZX95AaAaxotJJbKpG8DK k3JfDNY2SGsdSFF4CNvvWMbp1gwWKBJiRs7t+6O8IDBTxIFCWpjUvOWqEelw+CGt hLc67vvTYibJIU2z/nZXp2hC8XXc73WPjpKev/88XFDrDAncHPr0sZhSQ7CyBAfn Faq/U5CJ2zRZVHF+IbJ54u5jLsPrl1pTFI6kUQ6dIZEQjZeOXgS7GO32mY91PeLZ semJdSdk63CSRdVrJSAzliGdXrQUhouLYXxJvY42tig53J71UEfBwerY3gDYu98j XOZ3u/hgs41GnSK4xgaghVCHh/TuPy+7vrN0VFaGkz8z2pMpsxXqJeHWeQh94diO L/tvek+8wbEAmrKsO/qN96BXLsxZwA1JkoYO+HemWrmkVPjOeaIcMsAGLv5D691C 59GLy7DWnXJ45CXDcxzsHt2ExzS4mSs5dFvkDHVSmsZ90Rx4OO5PdGRYSisSf4fk KADmLNfY6dwocd4OiqDkQJO7t5vIplhiZBd0n3BIwFTz584iq5yqXuMD299Dsw3B Xo6YxzwRpDW7IPgCZu1YWecfFS49RPK7SffNmIiuou73FMHlneG1xqYioze48a+3 Tx43YsNaPUIjLPFxr76tLGNPL1jbmsi0S4EUGJwkhNTsMHBP1PRn86dyANRMFiR0 WvPEisl9cVrSXQDFSQ++ =sxSu -----END PGP SIGNATURE----- --b9dEYEwnDXkv9lSy--