Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755451AbbGQSEU (ORCPT ); Fri, 17 Jul 2015 14:04:20 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:55937 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752989AbbGQSET (ORCPT ); Fri, 17 Jul 2015 14:04:19 -0400 Date: Fri, 17 Jul 2015 19:04:02 +0100 From: Mark Brown To: Xing Zheng Cc: dgreid@chromium.org, dianders@chromium.org, heiko@sntech.de, sonnyrao@chromium.org, linux-rockchip@lists.infradead.org, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org Message-ID: <20150717180402.GS11162@sirena.org.uk> References: <1436930143-31361-1-git-send-email-zhengxing@rock-chips.com> <1436930143-31361-2-git-send-email-zhengxing@rock-chips.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XmZLSFikexiR11mx" Content-Disposition: inline In-Reply-To: <1436930143-31361-2-git-send-email-zhengxing@rock-chips.com> X-Cookie: Stay together, drag each other down. 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: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec 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: 2132 Lines: 66 --XmZLSFikexiR11mx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jul 15, 2015 at 11:15:42AM +0800, Xing Zheng wrote: This looks pretty good, a couple of minor points below which should be quick to fix. > +static int rk_init(struct snd_soc_pcm_runtime *runtime) > +{ > + struct snd_soc_card *card = runtime->card; > + > + card->dapm.idle_bias_off = true; You shouldn't need to do this? If you do need to do it we should make it possible to do it from the card struct. > + ret = snd_soc_register_card(card); > + if (ret) { > + pr_err("snd_soc_register_card failed %d\n", ret); > + return ret; > + } > + > + ret = snd_soc_of_parse_card_name(card, "rockchip,model"); > + if (ret) > + return ret; This should be devm_snd_soc_register_card() and you need to parse the card name before registering it, otherwise the card might instantiate before the name is set. > +static int snd_rk_mc_remove(struct platform_device *pdev) > +{ > + struct snd_soc_card *soc_card = platform_get_drvdata(pdev); > + > + snd_soc_card_set_drvdata(soc_card, NULL); > + snd_soc_unregister_card(soc_card); > + platform_set_drvdata(pdev, NULL); No need for any of the _set_drvdata() calls, the core does them and they shouldn't make any difference anyway. --XmZLSFikexiR11mx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVqUORAAoJECTWi3JdVIfQyUQH/345639K84F3Rm4/qiSeG5d4 QWl3Lq+TO58kaWj3P9em5F48qqvj/dJySmfobyF2L4iGT88wDBpLmgemdQbglxl+ SPB3ZgorWRcxEbmfP3pFP9H39/TwGQXyubNB0+ihYOEoFHjDPhfrueOxUDES/gPB 6UVxmVJrmga4+sjGtvrvz3wzeWekgEtCyGT9CXgEEvYEe5+c61pTKxnO04yKsHy5 bwySiPxRO2Nj/L50jD/LaF39QdqGrovKbS4pT2g/Xw20elZi3G7rTNAaqiscVJuW TPcMjyfkJZebV/3A7dB2wVDZL2jApdVUpMCuKa2+Qv7pmbZRwwoo9AwtT6E+Mhw= =027Z -----END PGP SIGNATURE----- --XmZLSFikexiR11mx-- -- 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/