lkml.org 
[lkml]   [2013]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] clk: si5351: Allow to build without CONFIG_OF
Date
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


\
 
 \ /
  Last update: 2013-04-28 20:41    [W:1.042 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site