diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-06-07 18:38:56 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-06-07 18:38:56 +0200 |
commit | 9eb34302681d3f6cf0b186aae31ba08cbd5f22fb (patch) | |
tree | 4cae22049ea71aa548c885671fe252d1bd8248fe /sound/soc/au1x/psc-i2s.c | |
parent | 9d7db2b2cb507f31ff29e339e9ed2f825edb555d (diff) | |
parent | 04c09a15f5c3a1f468cb8daf570eec3af21940ed (diff) | |
download | kernel_samsung_aries-9eb34302681d3f6cf0b186aae31ba08cbd5f22fb.zip kernel_samsung_aries-9eb34302681d3f6cf0b186aae31ba08cbd5f22fb.tar.gz kernel_samsung_aries-9eb34302681d3f6cf0b186aae31ba08cbd5f22fb.tar.bz2 |
Merge branch 'for-2.6.36' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc
Diffstat (limited to 'sound/soc/au1x/psc-i2s.c')
-rw-r--r-- | sound/soc/au1x/psc-i2s.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c index 495be6e..737b238 100644 --- a/sound/soc/au1x/psc-i2s.c +++ b/sound/soc/au1x/psc-i2s.c @@ -321,12 +321,10 @@ static int __init au1xpsc_i2s_drvprobe(struct platform_device *pdev) } ret = -EBUSY; - wd->ioarea = request_mem_region(r->start, r->end - r->start + 1, - "au1xpsc_i2s"); - if (!wd->ioarea) + if (!request_mem_region(r->start, resource_size(r), pdev->name)) goto out0; - wd->mmio = ioremap(r->start, 0xffff); + wd->mmio = ioremap(r->start, resource_size(r)); if (!wd->mmio) goto out1; @@ -362,8 +360,7 @@ static int __init au1xpsc_i2s_drvprobe(struct platform_device *pdev) snd_soc_unregister_dai(&au1xpsc_i2s_dai); out1: - release_resource(wd->ioarea); - kfree(wd->ioarea); + release_mem_region(r->start, resource_size(r)); out0: kfree(wd); return ret; @@ -372,6 +369,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,8 +382,7 @@ static int __devexit au1xpsc_i2s_drvremove(struct platform_device *pdev) au_sync(); iounmap(wd->mmio); - release_resource(wd->ioarea); - kfree(wd->ioarea); + release_mem_region(r->start, resource_size(r)); kfree(wd); au1xpsc_i2s_workdata = NULL; /* MDEV */ |