diff options
Diffstat (limited to 'src/drivers/spi/macronix.c')
-rw-r--r-- | src/drivers/spi/macronix.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/drivers/spi/macronix.c b/src/drivers/spi/macronix.c index 1516770579..51d8956351 100644 --- a/src/drivers/spi/macronix.c +++ b/src/drivers/spi/macronix.c @@ -161,20 +161,14 @@ static int macronix_write(struct spi_flash *flash, unsigned long page_size; size_t chunk_len; size_t actual; - int ret; + int ret = 0; u8 cmd[4]; page_size = mcx->params->page_size; byte_addr = offset % page_size; flash->spi->rw = SPI_WRITE_FLAG; - ret = spi_claim_bus(flash->spi); - if (ret) { - printk(BIOS_WARNING, "SF: Unable to claim SPI bus\n"); - return ret; - } - ret = 0; for (actual = 0; actual < len; actual += chunk_len) { chunk_len = min(len - actual, page_size - byte_addr); chunk_len = spi_crop_chunk(sizeof(cmd), chunk_len); @@ -215,7 +209,6 @@ static int macronix_write(struct spi_flash *flash, " 0x%lx\n", len, (unsigned long)(offset - len)); #endif - spi_release_bus(flash->spi); return ret; } |