[PATCH 05/10] clk: Add support for simple dividers

Jeremy Kerr
2011-04-19T00:32:40Z

Hi Stephen,

> > +#define to_clk_divider(clk) (container_of(clk, struct clk_divider, clk))
>
> Can you make this a static inline function with actual types? We get
> slightly more type safety that way.

Do we? The container_of macro requires that that it's first argument is
the same type as type->member, and returns a (type), so I don't see how
we're going to miss typing errors here.

However, with these macros, we need to use a parameter name that isn't
the same as the member name. Sascha: can you fix this? I'll update the
clk_fixed support.

Cheers,

Jeremy