On Sat, Jun 01, 2002 at 12:28:34PM +1000, Murray Jensen wrote: > > On Fri, 31 May 2002 07:47:25 -0700, Tom Rini <trini at kernel.crashing.org> > writes: > >> I think the file that includes <linux/i2c-algo-cpm.h> is expected to > >> include > >> commproc.h, or cpm_8260.h, as required. What is the policy on these things? > >> Should every include file include all headers it needs? Anyone? > > > >IMHO, a header file should only include other things which the header > >itself needs. eg if you do 'u8 foo;' in foo.h, add #include <asm/types.h> > > OK, but should it include *all* headers it needs? If so, then the existing > <linux/i2c-algo-8xx.h> should include both <asm/8xx_immap.h> and > <asm/commproc.h> since it uses the types "i2c8xx_t" and "cpm8xx_t".
It a header should include all headers that it needs. If linux/i2c-algo-8xx.h has 'cpm8xx_t foo;' then it should have been including <asm/8xx_immap.h> :) -- Tom Rini (TR1265) http://gate.crashing.org/~trini/ ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
