]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
spi: Add declaration for spi_flash_cmd_bp_unlock
authorMichal Simek <michal.simek@xilinx.com>
Wed, 28 Oct 2015 16:03:59 +0000 (17:03 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 28 Oct 2015 16:24:32 +0000 (17:24 +0100)
This patch removes compilation warning:
+../drivers/mtd/spi/sf_probe.c: In function
'spi_flash_validate_params':
+../drivers/mtd/spi/sf_probe.c:402:3: warning: implicit declaration of
function 'spi_flash_cmd_bp_unlock' [-Wimplicit-function-declaration]

Also add missing flash parameter:
+../drivers/mtd/spi/sf_probe.c: In function 'spi_flash_validate_params':
+../drivers/mtd/spi/sf_probe.c:402:3: error: too few arguments to
function 'spi_flash_cmd_bp_unlock'
+   ret = spi_flash_cmd_bp_unlock();

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/mtd/spi/sf_internal.h
drivers/mtd/spi/sf_probe.c

index f8e426729f4fd5e06532308b795a8196ad7a0ab7..63d2081f65649db51f617e680da8517babdd9956 100644 (file)
@@ -190,6 +190,8 @@ static inline int spi_flash_cmd_write_disable(struct spi_flash *flash)
        return spi_flash_cmd(flash->spi, CMD_WRITE_DISABLE, NULL, 0);
 }
 
+int spi_flash_cmd_bp_unlock(struct spi_flash *flash);
+
 /*
  * Send the read status command to the device and wait for the wip
  * (write-in-progress) bit to clear itself.
index c205b192efd5db9fcf3c627bb6c4a6bd51476d6d..bf84cebd71af88362d5bde724493fad6ca639a77 100644 (file)
@@ -399,7 +399,7 @@ static int spi_flash_validate_params(struct spi_slave *spi, u8 *idcode,
 #if defined(CONFIG_SPI_FLASH_SST)
        if(params->flags == SST_LOCKBP) {
                int ret;
-               ret = spi_flash_cmd_bp_unlock();
+               ret = spi_flash_cmd_bp_unlock(flash);
                if (ret) {
                        debug("SF: fail to unlock block protection\n");
                        return ret;