From: Lars-Peter Clausen <lars@metafoo.de>
To: Axel Lin <axel.lin@gmail.com>
Cc: alsa-devel@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@ti.com>, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH v2] ASoC: jz4740: Convert qi_lb60 to use snd_soc_register_card()
Date: Mon, 26 Dec 2011 11:33:00 +0100 [thread overview]
Message-ID: <4EF84D5C.2010908@metafoo.de> (raw)
In-Reply-To: <1324873802.23831.1.camel@phoenix>
On 12/26/2011 05:30 AM, Axel Lin wrote:
> Use snd_soc_register_card() instead of creating a "soc-audio" platform device.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
> v2: fix a typo in v1.
> Only compile tested, I appreciate if someone can test it.
Hi,
Looks good on first sight. One minor comment inline though. I wont have access
to the hardware until new year, so I can't test the patch right now.
Thanks,
- Lars
>
> arch/mips/jz4740/board-qi_lb60.c | 6 ++++
> sound/soc/jz4740/qi_lb60.c | 56 +++++++++++++++++--------------------
> 2 files changed, 32 insertions(+), 30 deletions(-)
>
> diff --git a/arch/mips/jz4740/board-qi_lb60.c b/arch/mips/jz4740/board-qi_lb60.c
> index 639e3ce..9a91fe9 100644
> --- a/arch/mips/jz4740/board-qi_lb60.c
> +++ b/arch/mips/jz4740/board-qi_lb60.c
> @@ -418,6 +418,11 @@ static struct platform_device qi_lb60_charger_device = {
> [...]
>
> -static void __exit qi_lb60_exit(void)
> +static int __devexit qi_lb60_remove(struct platform_device *pdev)
> {
> - platform_device_unregister(qi_lb60_snd_device);
> + struct snd_soc_card *card = platform_get_drvdata(pdev);
> +
> gpio_free_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios));
> + snd_soc_unregister_card(card);
It's probably better to free the card before the GPIOs since the card uses the
GPIOs.
> + return 0;
> }
> -module_exit(qi_lb60_exit);
> +
> +static struct platform_driver qi_lb60_driver = {
> + .driver = {
> + .name = "qi-lb60-audio",
> + .owner = THIS_MODULE,
> + },
> + .probe = qi_lb60_probe,
> + .remove = __devexit_p(qi_lb60_remove),
> +};
> +
> +module_platform_driver(qi_lb60_driver);
>
> MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
> MODULE_DESCRIPTION("ALSA SoC QI LB60 Audio support");
> MODULE_LICENSE("GPL v2");
> +MODULE_ALIAS("platform:qi-lb60-audio");
prev parent reply other threads:[~2011-12-26 10:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-26 4:30 [PATCH v2] ASoC: jz4740: Convert qi_lb60 to use snd_soc_register_card() Axel Lin
2011-12-26 10:33 ` Lars-Peter Clausen [this message]
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=4EF84D5C.2010908@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=axel.lin@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
--cc=ralf@linux-mips.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).