summaryrefslogtreecommitdiff
path: root/src/drivers/spi/eon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/spi/eon.c')
-rw-r--r--src/drivers/spi/eon.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/drivers/spi/eon.c b/src/drivers/spi/eon.c
index 85567eb0d6..69869e9ff0 100644
--- a/src/drivers/spi/eon.c
+++ b/src/drivers/spi/eon.c
@@ -73,7 +73,7 @@ static int eon_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 = eon->params->page_size;
@@ -81,13 +81,7 @@ static int eon_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);
@@ -128,7 +122,6 @@ static int eon_write(struct spi_flash *flash,
len, offset);
#endif
- spi_release_bus(flash->spi);
return ret;
}