On Sat, Jan 10, 2009 at 04:20:48PM +0000, Russell King - ARM Linux wrote: > On Sat, Jan 10, 2009 at 04:56:12PM +0100, Samuel Ortiz wrote: > > Hi Tony, > > > > On Wed, Jan 07, 2009 at 01:16:15PM +0200, Tony Lindgren wrote: > > > diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c > > > index b59c385..18179ac 100644 > > > --- a/drivers/mfd/twl4030-core.c > > > +++ b/drivers/mfd/twl4030-core.c > > > @@ -38,6 +38,7 @@ > > > #include <linux/i2c.h> > > > #include <linux/i2c/twl4030.h> > > > > > > +#include <mach/cpu.h> > > That will break the build on !ARM for this driver. > > ... which in itself is an argument for making it use the clk API > properly so that these kinds of CPU specific dependencies are kept > out of the driver. I agree. Until that gets done, if we really need to include a header file to fix this build, I would rather go for a generic one, <linux/io.h> for example. Cheers, Samuel. > In other words: > > if (cpu_is_omap2430()) > osc = clk_get(NULL, "osc_ck"); > else > osc = clk_get(NULL, "osc_sys_ck"); > > becomes: > > osc = clk_get(dev, "hfclk"); > > since "hfclk" is the name of the input on the device, or it should be > NULL if it is the only input on the device (iow, you don't want to > distinguish it from the 32kHz clock.) > > And that eliminates the need for any platform specific includes (which > is the whole point of the clk API - giving drivers a _generic_ way to > get at clock information without resorting to platform specific crap.) -- Intel Open Source Technology Centre http://oss.intel.com/ -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html