summaryrefslogtreecommitdiff
path: root/src/drivers/spi/spansion.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/spi/spansion.c')
-rw-r--r--src/drivers/spi/spansion.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/drivers/spi/spansion.c b/src/drivers/spi/spansion.c
index fc96e40260..fba816af62 100644
--- a/src/drivers/spi/spansion.c
+++ b/src/drivers/spi/spansion.c
@@ -141,7 +141,7 @@ static int spansion_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 = spsn->params->page_size;
@@ -149,13 +149,7 @@ static int spansion_write(struct spi_flash *flash,
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);
@@ -196,7 +190,6 @@ static int spansion_write(struct spi_flash *flash,
len, offset);
#endif
- spi_release_bus(flash->spi);
return ret;
}