mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-22 15:11:33 +00:00
sysinfo: Move #ifdef so that operations are always defined
At present the struct is not available unless SYSINFO is enabled. This is annoying since code it is not possible to use compile-time checks like CONFIG_IS_ENABLED(SYSINFO) with this header. Fix it by moving the #ifdef. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
e9adaa75bb
commit
2b8e5c8dfa
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,6 @@
|
||||||
* to read the serial number.
|
* to read the serial number.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if CONFIG_IS_ENABLED(SYSINFO)
|
|
||||||
struct sysinfo_ops {
|
struct sysinfo_ops {
|
||||||
/**
|
/**
|
||||||
* detect() - Run the hardware info detection procedure for this
|
* detect() - Run the hardware info detection procedure for this
|
||||||
|
@ -102,6 +101,7 @@ struct sysinfo_ops {
|
||||||
|
|
||||||
#define sysinfo_get_ops(dev) ((struct sysinfo_ops *)(dev)->driver->ops)
|
#define sysinfo_get_ops(dev) ((struct sysinfo_ops *)(dev)->driver->ops)
|
||||||
|
|
||||||
|
#if CONFIG_IS_ENABLED(SYSINFO)
|
||||||
/**
|
/**
|
||||||
* sysinfo_detect() - Run the hardware info detection procedure for this device.
|
* sysinfo_detect() - Run the hardware info detection procedure for this device.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue