[U-Boot] [PATCH][Net] Convert SMC91111 Ethernet driver toCONFIG_NET_MULTI API
Robin Getz
rgetz at blackfin.uclinux.org
Tue Jul 28 00:33:30 CEST 2009
On Mon 27 Jul 2009 18:17, Ben Warren pondered:
> I actually like to have them in the board C code. To the casual
> observer, it is obvious that certain ethernet controllers are optional,
> whereas if all they see is a string of initialization functions for
> different chips they might say, "WTF?".
Like I said - it is a style thing. less ifdefs is better in my opinion. Since
you need to answer more questions about things - your way is OK too...
Something like this is pretty easy to understand - and on modern compilers
(anything over 3.x gcc) should compile to the same as yours (and I think is
just as easy to understand for the casual reader)
if (smc91111_initialize(0, CONFIG_SMC91111_BASE))
return 1;
return 0;
More information about the U-Boot
mailing list