diff options
Diffstat (limited to 'kernel/sound/soc/au1x/psc-i2s.c')
-rw-r--r-- | kernel/sound/soc/au1x/psc-i2s.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/kernel/sound/soc/au1x/psc-i2s.c b/kernel/sound/soc/au1x/psc-i2s.c index e742ef668..0bf9d62b9 100644 --- a/kernel/sound/soc/au1x/psc-i2s.c +++ b/kernel/sound/soc/au1x/psc-i2s.c @@ -296,7 +296,6 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev) { struct resource *iores, *dmares; unsigned long sel; - int ret; struct au1xpsc_audio_data *wd; wd = devm_kzalloc(&pdev->dev, sizeof(struct au1xpsc_audio_data), @@ -305,19 +304,9 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev) return -ENOMEM; iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!iores) - return -ENODEV; - - ret = -EBUSY; - if (!devm_request_mem_region(&pdev->dev, iores->start, - resource_size(iores), - pdev->name)) - return -EBUSY; - - wd->mmio = devm_ioremap(&pdev->dev, iores->start, - resource_size(iores)); - if (!wd->mmio) - return -EBUSY; + wd->mmio = devm_ioremap_resource(&pdev->dev, iores); + if (IS_ERR(wd->mmio)) + return PTR_ERR(wd->mmio); dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0); if (!dmares) |