Use IS_ENABLED to prevent ifdef in board_check_usb_power.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
hang();
}
-#ifdef CONFIG_ADC
static int board_check_usb_power(void)
{
struct ofnode_phandle_args adc_args;
int ret, uV, adc_count;
u32 nb_blink;
u8 i;
+
+ if (!IS_ENABLED(CONFIG_ADC))
+ return -ENODEV;
+
node = ofnode_path("/config");
if (!ofnode_valid(node)) {
debug("%s: no /config node?\n", __func__);
return 0;
}
-#endif /* CONFIG_ADC */
static void sysconf_init(void)
{
}
#endif
-#ifdef CONFIG_ADC
/* for DK1/DK2 boards */
board_check_usb_power();
-#endif /* CONFIG_ADC */
return 0;
}