Commit 3bed3344 authored by Mark Brown's avatar Mark Brown

ASoC: txx9aclc_ac97: Convert to devm_ioremap_resource()

Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 65fb3e72
...@@ -188,9 +188,9 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev) ...@@ -188,9 +188,9 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
if (!r) if (!r)
return -EBUSY; return -EBUSY;
if (!devm_request_mem_region(&pdev->dev, r->start, resource_size(r), drvdata->base = devm_ioremap_resource(&pdev->dev, r);
dev_name(&pdev->dev))) if (IS_ERR(drvdata->base))
return -EBUSY; return PTR_ERR(drvdata->base);
drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL); drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
if (!drvdata) if (!drvdata)
...@@ -201,9 +201,6 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev) ...@@ -201,9 +201,6 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
r->start >= TXX9_DIRECTMAP_BASE && r->start >= TXX9_DIRECTMAP_BASE &&
r->start < TXX9_DIRECTMAP_BASE + 0x400000) r->start < TXX9_DIRECTMAP_BASE + 0x400000)
drvdata->physbase |= 0xf00000000ull; drvdata->physbase |= 0xf00000000ull;
drvdata->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
if (!drvdata->base)
return -EBUSY;
err = devm_request_irq(&pdev->dev, irq, txx9aclc_ac97_irq, err = devm_request_irq(&pdev->dev, irq, txx9aclc_ac97_irq,
0, dev_name(&pdev->dev), drvdata); 0, dev_name(&pdev->dev), drvdata);
if (err < 0) if (err < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment