summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@nvidia.com>2011-04-25 16:24:29 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-04-26 15:56:19 -0700
commit983ac2f5681beb01bbcc7c43032436c9285e2f3a (patch)
tree2af87f4997b6286dd8ed6070830a9ce5388d4dcd /sound
parent8b6d7bb5c9a2a35b3a6a73c51104c4bde6f6ed75 (diff)
sound: tegra: remove i2s resources
Change-Id: Ieaa90cf40a7a5e190b73f83b6a17f43908377af4
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/tegra/tegra_i2s.c49
1 files changed, 1 insertions, 48 deletions
diff --git a/sound/soc/tegra/tegra_i2s.c b/sound/soc/tegra/tegra_i2s.c
index 7ad1af85bc2c..6580ba3e3049 100644
--- a/sound/soc/tegra/tegra_i2s.c
+++ b/sound/soc/tegra/tegra_i2s.c
@@ -403,7 +403,6 @@ EXPORT_SYMBOL_GPL(tegra_i2s_dai);
static int tegra_i2s_driver_probe(struct platform_device *pdev)
{
int err = 0;
- struct resource *res, *mem;
struct tegra_i2s_info *info;
int i = 0;
@@ -416,44 +415,6 @@ static int tegra_i2s_driver_probe(struct platform_device *pdev)
info->pdata->driver_data = info;
BUG_ON(!info->pdata);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev, "no mem resource!\n");
- err = -ENODEV;
- goto fail;
- }
-
- mem = request_mem_region(res->start, resource_size(res), pdev->name);
- if (!mem) {
- dev_err(&pdev->dev, "memory region already claimed!\n");
- err = -EBUSY;
- goto fail;
- }
-
- info->i2s_phys = res->start;
- info->i2s_base = ioremap(res->start, res->end - res->start + 1);
- if (!info->i2s_base) {
- dev_err(&pdev->dev, "cannot remap iomem!\n");
- err = -ENOMEM;
- goto fail_release_mem;
- }
-
- res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
- if (!res) {
- dev_err(&pdev->dev, "no dma resource!\n");
- err = -ENODEV;
- goto fail_unmap_mem;
- }
- info->dma_req_sel = res->start;
-
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
- dev_err(&pdev->dev, "no irq resource!\n");
- err = -ENODEV;
- goto fail_unmap_mem;
- }
- info->irq = res->start;
-
err = i2s_configure(info);
if (err) {
goto fail_clock;
@@ -468,18 +429,13 @@ static int tegra_i2s_driver_probe(struct platform_device *pdev)
tegra_i2s_dai[i].private_data = info;
err = snd_soc_register_dai(&tegra_i2s_dai[i]);
if (err)
- goto fail_unmap_mem;
+ goto fail_clock;
}
}
return 0;
fail_clock:
i2s_close(pdev->id);
-fail_unmap_mem:
- iounmap(info->i2s_base);
-fail_release_mem:
- release_mem_region(mem->start, resource_size(mem));
-fail:
kfree(info);
return err;
}
@@ -489,9 +445,6 @@ static int __devexit tegra_i2s_driver_remove(struct platform_device *pdev)
{
struct tegra_i2s_info *info = tegra_i2s_dai[pdev->id].private_data;
- if (info->i2s_base)
- iounmap(info->i2s_base);
-
if (info)
kfree(info);