Re: [PATCH] clk: si5351: Allow to build without CONFIG_OF
From: Arnd Bergmann
Date: Sun Apr 28 2013 - 14:03:47 EST
On Sunday 28 April 2013, Sebastian Hesselbarth wrote:
> diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c
> index 8323c31..91c0f01 100644
> --- a/drivers/clk/clk-si5351.c
> +++ b/drivers/clk/clk-si5351.c
> @@ -1489,12 +1489,14 @@ static int si5351_i2c_probe(struct i2c_client *client,
> }
> }
>
> +#ifdef CONFIG_OF
> ret = of_clk_add_provider(client->dev.of_node, of_clk_src_onecell_get,
> &drvdata->onecell);
> if (ret) {
> dev_err(&client->dev, "unable to add clk provider\n");
> return ret;
> }
> +#endif
>
I think we should instead make of_clk_add_provider return 0 if CONFIG_OF
is disabled, adn we don't consider it an error condition to call it.
That is also what we return when CONFIG_OF is enabled and we boot without
a device tree.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/