lkml.org 
[lkml]   [2013]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] clk: si570: Add a driver for SI570 oscillators
On Fri, Sep 20, 2013 at 11:15:29AM -0700, Guenter Roeck wrote:
> On Fri, Sep 20, 2013 at 10:39:17AM -0700, Soren Brinkmann wrote:
[...]
> > diff --git a/drivers/clk/clk-si570.c b/drivers/clk/clk-si570.c
> > new file mode 100644
> > index 0000000..13c2091
> > --- /dev/null
> > +++ b/drivers/clk/clk-si570.c
[...]
> > +static int si570_probe(struct i2c_client *client,
[...]
> > + /* Read the requested initial output frequency from device tree */
> > + if (!of_property_read_u32(client->dev.of_node, "clock-frequency",
> > + &initial_fout)) {
> > + err = clk_set_rate(clk, initial_fout);
> > + if (err) {
> > + of_clk_del_provider(client->dev.of_node);
> > + clk_unregister(data->hw.clk);
>
> Is that needed ? I would have thought it isn't because you use a devm_ function
> to register it.
>
> Not that I understand the clk code, but getting clk from the registration
> function and unregistering hw.clk (without seting it) sems a bit odd.
> Is it well defined that you have to unregister hw.clk ?
You're absolutely right. I'll remove all calls to clk_unregister().
Thanks for finding that one.

Sören


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2013-09-21 00:21    [W:0.045 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site