summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/option.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/include/option.h b/src/include/option.h
index 74a6bbbfc2..40893788f3 100644
--- a/src/include/option.h
+++ b/src/include/option.h
@@ -7,25 +7,23 @@
void sanitize_cmos(void);
-enum cb_err cmos_set_uint_option(const char *name, unsigned int *value);
-enum cb_err cmos_get_uint_option(unsigned int *dest, const char *name);
+#if !CONFIG(USE_OPTION_TABLE)
-static inline enum cb_err set_uint_option(const char *name, unsigned int value)
+static inline unsigned int get_uint_option(const char *name, const unsigned int fallback)
{
- if (CONFIG(USE_OPTION_TABLE))
- return cmos_set_uint_option(name, &value);
-
- return CB_CMOS_OTABLE_DISABLED;
+ return fallback;
}
-static inline unsigned int get_uint_option(const char *name, const unsigned int fallback)
+static inline enum cb_err set_uint_option(const char *name, unsigned int value)
{
- if (CONFIG(USE_OPTION_TABLE)) {
- unsigned int value = 0;
- if (cmos_get_uint_option(&value, name) == CB_SUCCESS)
- return value;
- }
- return fallback;
+ return CB_CMOS_OTABLE_DISABLED;
}
+#else /* USE_OPTION_TABLE */
+
+unsigned int get_uint_option(const char *name, const unsigned int fallback);
+enum cb_err set_uint_option(const char *name, unsigned int value);
+
+#endif /* USE_OPTION_TABLE? */
+
#endif /* _OPTION_H_ */