sf: Drop spl_flash_get_sw_write_prot
[oweals/u-boot.git] / drivers / mtd / spi / sf-uclass.c
index c6107522be033eb8c0a0ed3dd94f093e2cf04bf6..9ce2ecb99ac2679347499c15aca27b11170304ee 100644 (file)
@@ -5,6 +5,8 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
+#include <malloc.h>
 #include <spi.h>
 #include <spi_flash.h>
 #include <dm/device-internal.h>
@@ -28,15 +30,6 @@ int spi_flash_erase_dm(struct udevice *dev, u32 offset, size_t len)
        return log_ret(sf_get_ops(dev)->erase(dev, offset, len));
 }
 
-int spl_flash_get_sw_write_prot(struct udevice *dev)
-{
-       struct dm_spi_flash_ops *ops = sf_get_ops(dev);
-
-       if (!ops->get_sw_write_prot)
-               return -ENOSYS;
-       return log_ret(ops->get_sw_write_prot(dev));
-}
-
 /*
  * TODO(sjg@chromium.org): This is an old-style function. We should remove
  * it when all SPI flash drivers use dm