linux-mips
[Top] [All Lists]

Re: [alsa-devel] [PATCH] ASoC: Add TXx9 AC link controller driver (v2)

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [alsa-devel] [PATCH] ASoC: Add TXx9 AC link controller driver (v2)
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date: Mon, 18 May 2009 15:23:05 +0100
Cc: linux-mips@linux-mips.org, alsa-devel@alsa-project.org, ralf@linux-mips.org
In-reply-to: <1242655812-11155-1-git-send-email-anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1242655812-11155-1-git-send-email-anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, May 18, 2009 at 11:10:12PM +0900, Atsushi Nemoto wrote:

> +static int txx9aclc_ac97_probe(struct platform_device *pdev,
> +                            struct snd_soc_dai *dai)
> +{
> +     struct snd_soc_device *socdev = platform_get_drvdata(pdev);
> +     struct txx9aclc_soc_device *dev =
> +             container_of(socdev, struct txx9aclc_soc_device, soc_dev);
> +     struct platform_device *aclc_pdev = dev->aclc_pdev;
> +     struct resource *r;
> +     int err;
> +     int irq;
> +
> +     dev->irq = -1;
> +     irq = platform_get_irq(aclc_pdev, 0);

This isn't what I meant by moving the resources to the DAI and DMA
drivers.  You have moved the calls to read the resources to these
drivers (which is good) but the resources are still being obtained from
the main ASoC device rather than by themselves from the device code.

There aren't too many platforms using this approach yet but take a look
at the way the pxa2xx-ac97 driver deals with registering the DAI (it
doesn't do anything with resources ATM) - you want to be registering
your DAI and grabbing the resources from a platform driver probe like it
does.

<Prev in Thread] Current Thread [Next in Thread>