summaryrefslogtreecommitdiff
path: root/src/drivers/spi/winbond.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/spi/winbond.c')
-rw-r--r--src/drivers/spi/winbond.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/drivers/spi/winbond.c b/src/drivers/spi/winbond.c
index 907e52d12e..4c4150f40d 100644
--- a/src/drivers/spi/winbond.c
+++ b/src/drivers/spi/winbond.c
@@ -136,18 +136,13 @@ static int winbond_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 = 1 << stm->params->l2_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;
- }
for (actual = 0; actual < len; actual += chunk_len) {
chunk_len = min(len - actual, page_size - byte_addr);
@@ -191,7 +186,6 @@ static int winbond_write(struct spi_flash *flash,
ret = 0;
out:
- spi_release_bus(flash->spi);
return ret;
}