summaryrefslogtreecommitdiff
path: root/drivers/tpm/tpm_atmel_twi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tpm/tpm_atmel_twi.c')
-rw-r--r--drivers/tpm/tpm_atmel_twi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tpm/tpm_atmel_twi.c b/drivers/tpm/tpm_atmel_twi.c
index d9e4877c5c..2dcc2af67f 100644
--- a/drivers/tpm/tpm_atmel_twi.c
+++ b/drivers/tpm/tpm_atmel_twi.c
@@ -81,7 +81,7 @@ static int tpm_atmel_twi_xfer(struct udevice *dev,
print_buffer(0, (void *)sendbuf, 1, send_size, 0);
#endif
-#ifndef CONFIG_DM_I2C
+#if !CONFIG_IS_ENABLED(DM_I2C)
res = i2c_write(0x29, 0, 0, (uchar *)sendbuf, send_size);
#else
res = dm_i2c_write(dev, 0, sendbuf, send_size);
@@ -92,7 +92,7 @@ static int tpm_atmel_twi_xfer(struct udevice *dev,
}
start = get_timer(0);
-#ifndef CONFIG_DM_I2C
+#if !CONFIG_IS_ENABLED(DM_I2C)
while ((res = i2c_read(0x29, 0, 0, recvbuf, 10)))
#else
while ((res = dm_i2c_read(dev, 0, recvbuf, 10)))
@@ -116,7 +116,7 @@ static int tpm_atmel_twi_xfer(struct udevice *dev,
return -1;
} else {
*recv_len = hdr_recv_len;
-#ifndef CONFIG_DM_I2C
+#if !CONFIG_IS_ENABLED(DM_I2C)
res = i2c_read(0x29, 0, 0, recvbuf, *recv_len);
#else
res = dm_i2c_read(dev, 0, recvbuf, *recv_len);