Replace devm_request_mem_region / devm_ioremap with devm_ioremap_resource.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
resource_size_t sane_sz,
int *err)
{
- struct device *dev = &pdev->dev;
struct resource *r;
- resource_size_t start;
resource_size_t sz;
void __iomem *ret;
return NULL;
}
- start = r->start;
- if (!devm_request_mem_region(dev, start, sz, r->name)) {
- *err = -EBUSY;
- return NULL;
- }
-
- ret = devm_ioremap(dev, start, sz);
- if (!ret) {
- *err = -ENOMEM;
+ ret = devm_ioremap_resource(&pdev->dev, r);
+ if (IS_ERR(ret)) {
+ *err = PTR_ERR(ret);
return NULL;
}