diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-08-29 23:09:49 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-08-30 07:15:36 -0400 |
commit | fd63542fc5492b86158dbd53ce5de764f171b1b6 (patch) | |
tree | 9f5f322741889ba47b5bf768461484809885fc05 /sound/soc/au1x | |
parent | edd98a1a2d163cef6d91226bf42ca002ced6ff16 (diff) |
ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource
Use devm_ioremap_resource() instead of open code.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/au1x')
-rw-r--r-- | sound/soc/au1x/psc-i2s.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c index e742ef668496..38e853add96e 100644 --- a/sound/soc/au1x/psc-i2s.c +++ b/sound/soc/au1x/psc-i2s.c | |||
@@ -305,19 +305,9 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev) | |||
305 | return -ENOMEM; | 305 | return -ENOMEM; |
306 | 306 | ||
307 | iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 307 | iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
308 | if (!iores) | 308 | wd->mmio = devm_ioremap_resource(&pdev->dev, iores); |
309 | return -ENODEV; | 309 | if (IS_ERR(wd->mmio)) |
310 | 310 | return PTR_ERR(wd->mmio); | |
311 | ret = -EBUSY; | ||
312 | if (!devm_request_mem_region(&pdev->dev, iores->start, | ||
313 | resource_size(iores), | ||
314 | pdev->name)) | ||
315 | return -EBUSY; | ||
316 | |||
317 | wd->mmio = devm_ioremap(&pdev->dev, iores->start, | ||
318 | resource_size(iores)); | ||
319 | if (!wd->mmio) | ||
320 | return -EBUSY; | ||
321 | 311 | ||
322 | dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0); | 312 | dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0); |
323 | if (!dmares) | 313 | if (!dmares) |