Re: [PATCH/RFC 5/6] staging: board: Add support for devices with complex dependencies

From: Russell King - ARM Linux
Date: Fri Apr 03 2015 - 13:08:21 EST

On Fri, Apr 03, 2015 at 03:27:40PM +0200, Geert Uytterhoeven wrote:
> On Fri, Apr 3, 2015 at 2:57 PM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> >> + error = clk_register_clkdev(clk, bsc->con_id, bsc->dev_id);
> >> + if (error)
> >> + pr_err("Failed to register clock %s (%d)\n", bsc->clk, error);
> >> + return error;
> >
> > Missing curly braces. Also it's weird that don't we need a clk_put()
> > on the error patch as well as the success path?
> Thanks!
> So it worked only by accident: with the new per-user struct clk instances
> clk_put() must not be called if clk_register_clkdev() succeeded.

Yes, that's because the per-user struct clk messed quite a lot of things
up - the patches were /not/ well tested before they went in.

That's no excuse to work around the breakage they caused though.

That said, I never did post the work I did earlier this month to fix the
problems in clkdev which those patches caused... so, I guess it's time
to post them and rush them in for the 4.1 merge window... (frankly, the
per-user struct clk patches should've been reverted.)

FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at