[PATCH 3/4] clk: si5351: Do not pass struct clk in platform_data

Fabio Estevam festevam at gmail.com
Thu Apr 30 11:20:38 PDT 2015


On Thu, Apr 30, 2015 at 2:45 PM, Sebastian Hesselbarth
<sebastian.hesselbarth at gmail.com> wrote:

>          * property silabs,pll-source : <num src>, [<..>]
>          * allow to selectively set pll source
> @@ -1328,8 +1321,17 @@ static int si5351_i2c_probe(struct i2c_client *client,
>         i2c_set_clientdata(client, drvdata);
>         drvdata->client = client;
>         drvdata->variant = variant;
> -       drvdata->pxtal = pdata->clk_xtal;
> -       drvdata->pclkin = pdata->clk_clkin;
> +       drvdata->pxtal = devm_clk_get(&client->dev, "xtal");
> +       drvdata->pclkin = devm_clk_get(&client->dev, "clkin");
> +
> +       if (PTR_ERR(drvdata->pxtal) == -EPROBE_DEFER ||
> +           PTR_ERR(drvdata->pclkin) == -EPROBE_DEFER)
> +               return -EPROBE_DEFER;
> +
> +       if (IS_ERR(drvdata->pxtal) && IS_ERR(drvdata->pclkin)) {

Don't you want || instead?



More information about the linux-arm-kernel mailing list