Subject: Re: [PATCH V2 11/14] NET: MIPS: lantiq: convert etop driver to clkdev api

From: Sergei Shtylyov <[email-masked]>
Date: Fri, 24 Feb 2012 14:55:15 +0400

Hello.

On 23-02-2012 20:03, John Crispin wrote:

> Update from old pmu_{dis,en}able() to ckldev api.

> Signed-off-by: John Crispin<[email-masked]>
> Cc: [email-masked]
[...]

> diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
> index e5ec8b1..6b2e4b4 100644
> --- a/drivers/net/ethernet/lantiq_etop.c
> +++ b/drivers/net/ethernet/lantiq_etop.c
[...]
> @@ -886,6 +903,22 @@ ltq_etop_probe(struct platform_device *pdev)
>   	priv->pdev = pdev;
>   	priv->pldata = dev_get_platdata(&pdev->dev);
>   	priv->netdev = dev;
> +
> +	priv->clk_ppe = clk_get(&pdev->dev, NULL);
> +	if (!priv->clk_ppe)
> +		return -ENOENT;
> +	if (ltq_has_gbit()) {
> +		priv->clk_switch = clk_get(&pdev->dev, "switch");
> +		if (!priv->clk_switch)

    clk_get() doesn't retirn NULL, it returns error code.

> +			return -ENOENT;
> +	}
> +	if (ltq_is_ase()) {
> +		priv->clk_ephy = clk_get(&pdev->dev, "ephy");
> +		priv->clk_ephycgu = clk_get(&pdev->dev, "ephycgu");
> +		if (!priv->clk_ephy || !priv->clk_ephycgu)

    Same here.

WBR, Sergei