sysinfo: Require that sysinfo_detect be called before other methods
authorSean Anderson <sean.anderson@seco.com>
Tue, 20 Apr 2021 14:50:56 +0000 (10:50 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 4 May 2021 11:57:18 +0000 (07:57 -0400)
commit4d65c6bcd71ab2a03a5b7fff0ecf22d068597b25
treec316ea01cce93a65522e5a08bef090cb01a16e74
parenteed0a7a3e6087d038fccea18676e285d9807b644
sysinfo: Require that sysinfo_detect be called before other methods

This has the uclass enforce calling detect() before other methods.  This
allows drivers to cache information in detect() and perform (cheaper)
retrieval in the other accessors. This also modifies the only instance
where this sequencing was not followed.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/spl/spl_fit.c
drivers/sysinfo/sysinfo-uclass.c
include/sysinfo.h
test/dm/sysinfo.c