Re: [PATCH 1/4] clk: Add a generic clock infrastructure

From: Mike Frysinger
Date: Mon May 30 2011 - 01:00:30 EST


On Wednesday, May 25, 2011 06:47:50 Richard Zhao wrote:
> On Fri, May 20, 2011 at 03:27:49PM +0800, Jeremy Kerr wrote:
> > +struct clk {
> > + const char *name;
> > + struct clk_hw_ops *ops;
> > + struct clk_hw *hw;
>
> If we don't let it void *, why not put clk_hw_ops into clk_hw too? It'll be
> more easy to define static clocks.

because the ops should be const, and possibly shared among multiple clocks.
i.e. if i have 4 SPI buses, there should only be one copy of the ops structure
but 4 clk_hw instances.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.