[PATCHv2] net: mvneta: use devm_ioremap_resource() instead of of_iomap()
Ezequiel Garcia
ezequiel.garcia at free-electrons.com
Wed Mar 26 04:42:11 EDT 2014
Hi Thomas,
On Mar 26, Thomas Petazzoni wrote:
> @@ -2838,9 +2840,10 @@ static int mvneta_probe(struct platform_device *pdev)
>
> clk_prepare_enable(pp->clk);
>
> - pp->base = of_iomap(dn, 0);
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + pp->base = devm_ioremap_resource(&pdev->dev, res);
> if (pp->base == NULL) {
As per the comment above devm_ioremap_resource() definition, the usage is:
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base))
return PTR_ERR(base);
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
More information about the linux-arm-kernel
mailing list