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

Jeremy Kerr jeremy.kerr at canonical.com
Mon Apr 18 20:32:40 EDT 2011

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.



More information about the linux-arm-kernel mailing list