]> git.sur5r.net Git - u-boot/blobdiff - include/spi_flash.h
vsprintf.c: Always enable CONFIG_SYS_VSNPRINTF
[u-boot] / include / spi_flash.h
index 0ae0062d12f5efbd2bfc132e2061c2342254e9e2..0d26b8a5aa0f5c8b5846afc650fe9dc89ff1bcc2 100644 (file)
@@ -170,8 +170,6 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
 /* Compatibility function - this is the old U-Boot API */
 void spi_flash_free(struct spi_flash *flash);
 
-int spi_flash_remove(struct udevice *flash);
-
 static inline int spi_flash_read(struct spi_flash *flash, u32 offset,
                                 size_t len, void *buf)
 {
@@ -237,7 +235,7 @@ static inline int spi_flash_erase(struct spi_flash *flash, u32 offset,
 static inline int spi_flash_protect(struct spi_flash *flash, u32 ofs, u32 len,
                                        bool prot)
 {
-       if (!flash->flash_lock)
+       if (!flash->flash_lock || !flash->flash_unlock)
                return -EOPNOTSUPP;
 
        if (prot)