diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/sf.c | 4 | ||||
-rw-r--r-- | cmd/spi.c | 6 |
2 files changed, 5 insertions, 5 deletions
@@ -91,7 +91,7 @@ static int do_spi_flash_probe(int argc, char *const argv[]) unsigned int speed = CONFIG_SF_DEFAULT_SPEED; unsigned int mode = CONFIG_SF_DEFAULT_MODE; char *endp; -#ifdef CONFIG_DM_SPI_FLASH +#if CONFIG_IS_ENABLED(DM_SPI_FLASH) struct udevice *new, *bus_dev; int ret; #else @@ -124,7 +124,7 @@ static int do_spi_flash_probe(int argc, char *const argv[]) return -1; } -#ifdef CONFIG_DM_SPI_FLASH +#if CONFIG_IS_ENABLED(DM_SPI_FLASH) /* Remove the old device, otherwise probe will just be a nop */ ret = spi_find_bus_and_cs(bus, cs, &bus_dev, &new); if (!ret) { @@ -38,7 +38,7 @@ static int do_spi_xfer(int bus, int cs) struct spi_slave *slave; int ret = 0; -#ifdef CONFIG_DM_SPI +#if CONFIG_IS_ENABLED(DM_SPI) char name[30], *str; struct udevice *dev; @@ -63,7 +63,7 @@ static int do_spi_xfer(int bus, int cs) goto done; ret = spi_xfer(slave, bitlen, dout, din, SPI_XFER_BEGIN | SPI_XFER_END); -#ifndef CONFIG_DM_SPI +#if !CONFIG_IS_ENABLED(DM_SPI) /* We don't get an error code in this case */ if (ret) ret = -EIO; @@ -79,7 +79,7 @@ static int do_spi_xfer(int bus, int cs) } done: spi_release_bus(slave); -#ifndef CONFIG_DM_SPI +#if !CONFIG_IS_ENABLED(DM_SPI) spi_free_slave(slave); #endif |