Skip to content

Commit

Permalink
ASoC: txx9aclc_ac97: Convert to devm_ioremap_resource()
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Mark Brown committed Jun 27, 2013
1 parent 65fb3e7 commit 3bed334
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sound/soc/txx9/txx9aclc-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
if (!r)
return -EBUSY;

if (!devm_request_mem_region(&pdev->dev, r->start, resource_size(r),
dev_name(&pdev->dev)))
return -EBUSY;
drvdata->base = devm_ioremap_resource(&pdev->dev, r);
if (IS_ERR(drvdata->base))
return PTR_ERR(drvdata->base);

drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
if (!drvdata)
Expand All @@ -201,9 +201,6 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
r->start >= TXX9_DIRECTMAP_BASE &&
r->start < TXX9_DIRECTMAP_BASE + 0x400000)
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,
0, dev_name(&pdev->dev), drvdata);
if (err < 0)
Expand Down

0 comments on commit 3bed334

Please sign in to comment.