From: Troy Kisky Date: Mon, 13 Mar 2023 21:31:38 +0000 (-0700) Subject: freescale: common: pfuze: define pfuze_mode_init only if defined(CONFIG_DM_PMIC) X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=e7b03ee0fc789e8340d26be55160e12fc3614f81;p=u-boot.git freescale: common: pfuze: define pfuze_mode_init only if defined(CONFIG_DM_PMIC) pfuze_mode_init calls pmic_reg_read which is only available from obj-$(CONFIG_$(SPL_TPL_)DM_PMIC) += pmic-uclass.o Prepare for conversion of defined(CONFIG_DM_PMIC) to CONFIG_IS_ENABLED(DM_PMIC). Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- diff --git a/board/freescale/common/pfuze.c b/board/freescale/common/pfuze.c index 6dca22960b..a9288820b2 100644 --- a/board/freescale/common/pfuze.c +++ b/board/freescale/common/pfuze.c @@ -91,7 +91,7 @@ struct pmic *pfuze_common_init(unsigned char i2cbus) return p; } -#else +#elif defined(CONFIG_DM_PMIC) int pfuze_mode_init(struct udevice *dev, u32 mode) { unsigned char offset, i, switch_num;