summaryrefslogtreecommitdiff
path: root/cmd/eeprom.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/eeprom.c')
-rw-r--r--cmd/eeprom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index 7fa62bba8f..b3fd37c827 100644
--- a/cmd/eeprom.c
+++ b/cmd/eeprom.c
@@ -61,7 +61,7 @@
#endif
#endif
-#if defined(CONFIG_DM_I2C)
+#if CONFIG_IS_ENABLED(DM_I2C)
static int eeprom_i2c_bus;
#endif
@@ -73,7 +73,7 @@ __weak int eeprom_write_enable(unsigned dev_addr, int state)
void eeprom_init(int bus)
{
/* I2C EEPROM */
-#if defined(CONFIG_DM_I2C)
+#if CONFIG_IS_ENABLED(DM_I2C)
eeprom_i2c_bus = bus;
#elif defined(CONFIG_SYS_I2C)
if (bus >= 0)
@@ -132,7 +132,7 @@ static int eeprom_rw_block(unsigned offset, uchar *addr, unsigned alen,
{
int ret = 0;
-#if defined(CONFIG_DM_I2C)
+#if CONFIG_IS_ENABLED(DM_I2C)
struct udevice *dev;
ret = i2c_get_chip_for_busnum(eeprom_i2c_bus, addr[0],