[PATCH] enhanced i2c driver for MPC8xx/MPC8260 CPM ...
Murray Jensen
Murray.Jensen at csiro.au
Sat Jun 1 12:28:34 EST 2002
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".
>Anything the C file needs itself, it should include, and for the sake of
>being explicit (and it's good for multi-arch drivers) if the C code does
>'u8 bar;' it should do #include <asm/types.h> too.
Agreed.
>> Should we take this discussion off the list now? Cheers!
>
>Nah..
I was referring to the discussion about the combined 8xx/8260 i2c driver
I posted. I agree - the above should stay on the list. Cheers!
Murray...
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list