From: lars@metafoo.de (Lars-Peter Clausen)
To: linux-arm-kernel@lists.infradead.org
Subject: [alsa-devel] [PATCH] ASoC: omap: convert per-board modules to platform drivers
Date: Thu, 08 Sep 2011 17:15:03 +0200 [thread overview]
Message-ID: <4E68DBF7.1030009@metafoo.de> (raw)
In-Reply-To: <1315494354-17597-1-git-send-email-mans.rullgard@linaro.org>
On 09/08/2011 05:05 PM, Mans Rullgard wrote:
> This converts the per-board modules to platform drivers for a
> device created by in main platform setup. These drivers call
> snd_soc_register_card() directly instead of going via a "soc-audio"
> device and the corresponding driver in soc-core.
>
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index 5b8ca68..7cb93d9 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -299,6 +299,11 @@ static struct platform_device omap_pcm = {
> .id = -1,
> };
>
> +static struct platform_device omap_soc_audio = {
> + .name = "omap-soc-audio",
> + .id = -1,
> +};
> +
> /*
> * OMAP2420 has 2 McBSP ports
> * OMAP2430 has 5 McBSP ports
> @@ -323,6 +328,7 @@ static void omap_init_audio(void)
> platform_device_register(&omap_mcbsp5);
>
> platform_device_register(&omap_pcm);
> + platform_device_register(&omap_soc_audio);
> }
>
> #else
> diff --git a/sound/soc/omap/am3517evm.c b/sound/soc/omap/am3517evm.c
> index 73dde4a..fcd18af 100644
> --- a/sound/soc/omap/am3517evm.c
> +++ b/sound/soc/omap/am3517evm.c
> @@ -151,45 +151,60 @@ static struct snd_soc_card snd_soc_am3517evm = {
> .num_links = 1,
> };
>
> [...]
> +static struct platform_driver am3517evm_driver = {
> + .driver = {
> + .name = "omap-soc-audio",
> + .owner = THIS_MODULE,
> + },
>
> - return ret;
> + .probe = am3517evm_soc_probe,
> + .remove = __devexit_p(am3517evm_soc_remove),
> +};
> +[...]
> +
> +static struct platform_driver igep2_driver = {
> + .driver = {
> + .name = "omap-soc-audio",
> + .owner = THIS_MODULE,
> + },
> +
> + .probe = igep2_soc_probe,
> + .remove = __devexit_p(igep2_soc_remove),
> +};
> [...]
>
> +static struct platform_driver n810_driver = {
> + .driver = {
> + .name = "omap-soc-audio",
> + .owner = THIS_MODULE,
> + },
> +
> + .probe = n810_soc_probe,
> + .remove = __devexit_p(n810_soc_remove),
> +};
> [...]
This isn't really any better then using the soc-core device, since all your
drivers are still named the same. udev still wouldn't know which one to load.
Use different device driver names for different drivers.
next prev parent reply other threads:[~2011-09-08 15:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-08 15:05 [PATCH] ASoC: omap: convert per-board modules to platform drivers Mans Rullgard
2011-09-08 15:15 ` Lars-Peter Clausen [this message]
2011-09-08 15:41 ` [alsa-devel] " Mans Rullgard
2011-09-08 16:37 ` Mark Brown
2011-09-08 17:36 ` Mans Rullgard
2011-09-08 16:13 ` Mark Brown
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=4E68DBF7.1030009@metafoo.de \
--to=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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).