According to Documentation/driver-model/devres.txt, devm_request_and_ioremap()
is deprecated, so use devm_ioremap_resource() instead.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
}
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->base = devm_request_and_ioremap(&pdev->dev, r);
- if (!priv->base) {
- dev_err(&pdev->dev, "can't ioremap\n");
- err = -EINVAL;
+ priv->base = devm_ioremap_resource(&pdev->dev, r);
+ if (IS_ERR(priv->base)) {
+ err = PTR_ERR(priv->base);
goto err;
}