alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Ricardo Neri <ricardo.neri@ti.com>
Cc: alsa-devel@alsa-project.org, lrg@ti.com, lrg@slimlogic.co.uk
Subject: Re: [PATCH 5/6] ASoC: OMAP4: Add HDMI Audio machine driver for OMAP4 boards
Date: Thu, 5 May 2011 09:25:17 +0100	[thread overview]
Message-ID: <20110505082516.GG11744@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1304580113-24819-6-git-send-email-ricardo.neri@ti.com>

On Thu, May 05, 2011 at 02:21:52AM -0500, Ricardo Neri wrote:

> +static struct snd_soc_dai_link omap4_hdmi_dai = {
> +		.name = "HDMI",
> +		.stream_name = "HDMI",

Indentation.

> +static __devinit int omap4_hdmi_probe(struct platform_device *pdev)
> +{
> +	struct snd_soc_card *card = &snd_soc_omap4_hdmi;
> +	int ret;
> +
> +	if (!cpu_is_omap44xx()) {
> +		dev_err(&pdev->dev, "Not running on OMAP4!\n");
> +		return -ENODEV;
> +	}

Why check this?  If the system can't support the DAIs they won't
register so it's redundant and it means more work for OMAP5.

> +	card->dev = &pdev->dev;
> +	platform_set_drvdata(pdev, card);

The set_drvdata() isn't needed.

> +	snd_soc_unregister_card(card);
> +	platform_set_drvdata(pdev, NULL);

You never need to reset driver data on unregister, nothing should
reference it except a driver.

> +MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>");
> +MODULE_DESCRIPTION("OMAP4 HDMI machine ASoC driver");
> +MODULE_LICENSE("GPL");

MODULE_ALIAS().

  reply	other threads:[~2011-05-05  8:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-05  7:21 [PATCH 0/6] ASoC: OMAP4: Add support for HDMI audio Ricardo Neri
2011-05-05  7:21 ` [PATCH 1/6] OMAP4: HDMI: Add OMAP device for HDMI audio CPU DAI Ricardo Neri
2011-05-05  8:17   ` Mark Brown
2011-05-05 19:24     ` Ricardo Neri
2011-05-06 13:16       ` Mark Brown
2011-05-08  0:09         ` Ricardo Neri
2011-05-05  7:21 ` [PATCH 2/6] OMAP4: Add device for HDMI OMAP4 audio for ASoC machine driver Ricardo Neri
2011-05-05  8:18   ` Mark Brown
2011-05-05 19:26     ` Ricardo Neri
2011-05-05  7:21 ` [PATCH 3/6] ASoC: OMAP: Add header for HDMI CPU DAI Ricardo Neri
2011-05-05  8:25   ` Mark Brown
2011-05-05 21:10     ` Ricardo Neri
2011-05-05  7:21 ` [PATCH 4/6] ASoC: OMAP: Add CPU DAI driver for HDMI Ricardo Neri
2011-05-05  8:22   ` Mark Brown
2011-05-05 19:35     ` Ricardo Neri
2011-05-06 13:21       ` Mark Brown
2011-05-08  0:05         ` Ricardo Neri
2011-05-08 10:34           ` Mark Brown
2011-05-08 11:14             ` Liam Girdwood
2011-05-08 15:56               ` Mark Brown
2011-05-08 19:44                 ` Liam Girdwood
2011-05-08 23:41                   ` Mark Brown
2011-05-12 13:48                     ` Neri, Ricardo
2011-05-05  7:21 ` [PATCH 5/6] ASoC: OMAP4: Add HDMI Audio machine driver for OMAP4 boards Ricardo Neri
2011-05-05  8:25   ` Mark Brown [this message]
2011-05-05 21:09     ` Ricardo Neri
2011-05-06 13:22       ` Mark Brown
2011-05-05  7:21 ` [PATCH 6/6] ASoC: OMAP: Update Makefile and Kconfig for HDMI audio Ricardo Neri

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=20110505082516.GG11744@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=lrg@ti.com \
    --cc=ricardo.neri@ti.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;
as well as URLs for NNTP newsgroup(s).