Re: [RFC 1/2] clk: use struct clk only for external API

2012-12-01 Thread Linus Walleij
On Wed, Nov 28, 2012 at 12:52 PM, Rabin Vincent wrote: > In order to provide per-user accounting, this separates the struct clk > used in the common clock framework into two structures 'struct clk_core' > and 'struct clk'. struct clk_core will be used for internal > manipulation and struct clk w

Re: [RFC 1/2] clk: use struct clk only for external API

2012-11-28 Thread Rabin Vincent
2012/11/28 viresh kumar : > On Wed, Nov 28, 2012 at 9:31 PM, viresh kumar wrote: >> On Wed, Nov 28, 2012 at 5:22 PM, Rabin Vincent >> Isn't something wrong here? For common clk case shouldn't >> this be: >> >>> +#define clk_to_clk_core(clk) (&clk->clk) >>> +#define clk_core_to_clk(core) (containe

Re: [RFC 1/2] clk: use struct clk only for external API

2012-11-28 Thread viresh kumar
On Wed, Nov 28, 2012 at 9:31 PM, viresh kumar wrote: > On Wed, Nov 28, 2012 at 5:22 PM, Rabin Vincent > Isn't something wrong here? For common clk case shouldn't > this be: > >> +#define clk_to_clk_core(clk) (&clk->clk) >> +#define clk_core_to_clk(core) (container_of(clk, ...)) //not getting int

Re: [RFC 1/2] clk: use struct clk only for external API

2012-11-28 Thread viresh kumar
On Wed, Nov 28, 2012 at 5:22 PM, Rabin Vincent wrote: > In order to provide per-user accounting, this separates the struct clk > used in the common clock framework into two structures 'struct clk_core' > and 'struct clk'. struct clk_core will be used for internal > manipulation and struct clk wil