[U-Boot] [PATCH][NEXT] hwmon: do not init sensors on startup

Wolfgang Denk wd at denx.de
Thu Dec 9 19:50:43 CET 2010


Dear Heiko Schocher,

In message <4D00F98B.1010507 at denx.de> you wrote:
> 
> >> +static unsigned long sensors_init_done = 0;
> > 
> > What if there are more then 32 sensors?
> 
> Ok, that would not work ... Hmm.. I can get the number of DTTs on a board
> with ARRAY_SIZE(CONFIG_DTT_SENSORS) ... should I use this info to allocate
> an array, which stores the info, if the DTTs are initialized?

No - it's only a theoretical case. But I think you should add a
compile-time test to catch such errors.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
... bacteriological warfare ... hard to believe we were once foolish
enough to play around with that.
	-- McCoy, "The Omega Glory", stardate unknown


More information about the U-Boot mailing list