public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Xing Zheng <zhengxing@rock-chips.com>
Cc: dgreid@chromium.org, dianders@chromium.org, heiko@sntech.de,
	sonnyrao@chromium.org, linux-rockchip@lists.infradead.org,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
	linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec
Date: Fri, 17 Jul 2015 19:04:02 +0100	[thread overview]
Message-ID: <20150717180402.GS11162@sirena.org.uk> (raw)
In-Reply-To: <1436930143-31361-2-git-send-email-zhengxing@rock-chips.com>

[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]

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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  parent reply	other threads:[~2015-07-17 18:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15  3:15 [PATCH 0/2] Add codec machine driver for rockchip platform Xing Zheng
2015-07-15  3:15 ` [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec Xing Zheng
2015-07-16  8:05   ` Paul Bolle
2015-07-16 11:00     ` Mark Brown
2015-07-16 11:22       ` zhengxing
2015-07-16 11:47       ` Paul Bolle
2015-07-16 12:55         ` Mark Brown
2015-07-16 14:15           ` Paul Bolle
2015-07-16 15:05             ` Mark Brown
2015-07-16 16:22               ` Paul Bolle
2015-07-16 19:57                 ` Mark Brown
2015-07-17  2:17             ` zhengxing
2015-07-16 11:20     ` zhengxing
2015-07-16 11:49       ` Paul Bolle
2015-07-16 11:59         ` zhengxing
2015-07-16 14:19           ` Paul Bolle
2015-07-16 15:25             ` Jiang Liu
2015-07-16 16:08               ` Paul Bolle
2015-07-17 18:04   ` Mark Brown [this message]
2015-07-18  3:51     ` zhengxing
2015-07-18  4:15       ` zhengxing
2015-07-15  3:15 ` [PATCH 2/2] ASoC: rockchip: Add machine driver for rt5645/rt5650 codec Xing Zheng
2015-07-17 18:11   ` Mark Brown
2015-07-18  3:52     ` zhengxing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150717180402.GS11162@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=dgreid@chromium.org \
    --cc=dianders@chromium.org \
    --cc=heiko@sntech.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=perex@perex.cz \
    --cc=sonnyrao@chromium.org \
    --cc=tiwai@suse.de \
    --cc=zhengxing@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox