> +static int mvpp2_get_sram(struct platform_device *pdev,
> +                       struct mvpp2 *priv)
> +{
> +     struct resource *res;
> +
> +     res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> +     if (!res) {
> +             if (has_acpi_companion(&pdev->dev))
> +                     dev_warn(&pdev->dev, "ACPI is too old, Flow control not 
> supported\n");
> +             else
> +                     dev_warn(&pdev->dev, "DT is too old, Flow control not 
> supported\n");
> +             return 0;
> +     }
> +
> +     priv->cm3_base = devm_ioremap_resource(&pdev->dev, res);
> +     if (IS_ERR(priv->cm3_base))
> +             return PTR_ERR(priv->cm3_base);
> +
> +     return 0;
> +}

This looks much better. Thanks

Reviewed-by: Andrew Lunn <and...@lunn.ch>

    Andrew

Reply via email to