diff options
author | Simon Glass | 2021-02-04 21:17:21 -0700 |
---|---|---|
committer | Bin Meng | 2021-02-06 19:20:29 +0800 |
commit | 2b8e5c8dfa01e60e616ed75cf333ac4cda8977ef (patch) | |
tree | 1f97aadb3caaf2c11034596e966662f3065fedaf /include/sysinfo.h | |
parent | e9adaa75bb38ded5cf4e460270315afd891d141c (diff) |
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>
Diffstat (limited to 'include/sysinfo.h')
-rw-r--r-- | include/sysinfo.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sysinfo.h b/include/sysinfo.h index c045d316b07..6e021253524 100644 --- a/include/sysinfo.h +++ b/include/sysinfo.h @@ -31,7 +31,6 @@ * to read the serial number. */ -#if CONFIG_IS_ENABLED(SYSINFO) struct sysinfo_ops { /** * 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) +#if CONFIG_IS_ENABLED(SYSINFO) /** * sysinfo_detect() - Run the hardware info detection procedure for this device. * |