[alsa-devel] [PATCH v2] alsa/Au1xxx-PSC: use resource_size
Manuel Lauss
manuel.lauss at googlemail.com
Fri May 28 07:52:19 CEST 2010
On Fri, May 28, 2010 at 7:44 AM, Wan ZongShun <mcuos.com at gmail.com> wrote:
> Dear Manuel & Mark,
>
> Fix it again.
> Signed-off-by:Wan ZongShun<mcuos.com at gmail.com>
>
> From 389d787f06d2ac0b4c8cac2705385295b0d7c112 Mon Sep 17 00:00:00 2001
> From: zswan <zswan at zswan-marvell.(none)>
> Date: Fri, 28 May 2010 13:39:12 +0800
> Subject: [PATCH 4/4] -fix-some-issues-of-aux01 v1
Please write a proper log entry.
> --- a/sound/soc/au1x/psc-i2s.c
> +++ b/sound/soc/au1x/psc-i2s.c
[snip]
> @@ -372,6 +371,7 @@ out0:
> static int __devexit au1xpsc_i2s_drvremove(struct platform_device *pdev)
> {
> struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
> + struct resource *r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>
> if (wd->dmapd)
> au1xpsc_pcm_destroy(wd->dmapd);
> @@ -384,7 +384,7 @@ static int __devexit au1xpsc_i2s_drvremove(struct
> platform_device *pdev)
> au_sync();
>
> iounmap(wd->mmio);
> - release_resource(wd->ioarea);
> + release_mem_region(r->start, resource_size(r));
> kfree(wd->ioarea);
This kfree() needs to go too. (Sidenote: I wrote the code this way to avoid
the platform_get_resource() you inserted above).
> kfree(wd);
I'll run it on real hardware just to be sure.
Manuel
More information about the Alsa-devel
mailing list