dfu: dfu_sf: Fix read offset
PATCH 1/1 dfu: dfu_sf: Fix read offset
The offset was applied to write, but not read, now its applied to both.
Signed-off-by Phil Edworthy <[email protected]>
--- drivers/dfu/dfu_sf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/dfu/dfu_sf.c +2 -1
@@ -20,7 +20,8 @@ static long dfu_get_medium_size_sf(struct dfu_entity *dfu)static int dfu_read_medium_sf (struct dfu_entity *dfu,u64 offset,void *buf,long *len) { -return spi_flash_read (dfu->data.sf.dev, offset, *len, buf); +return spi_flash_read (dfu->data.sf.dev, dfu->data.sf.start + offset, + *len, buf); }static u64 find_sector (struct dfu_entity *dfu,u64 start,u64 offset)
Signature · 1 line
2.7.4
PATCH 1/1 dfu: dfu_sf: Fix read offset
Quoted 4 lines · Phil Edworthy
The offset was applied to write, but not read, now its applied to both.
Signed-off-by Phil Edworthy <[email protected]>
Reviewed-by Fabio Estevam <[email protected]>
PATCH 1/1 dfu: dfu_sf: Fix read offset
In reply to Phil EdworthyHi Phil,
Quoted 19 lines
The offset was applied to write, but not read, now its applied to both.
Signed-off-by Phil Edworthy <[email protected]>--- drivers/dfu/dfu_sf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/dfu/dfu_sf.c +0
-0@@ -20,7 +20,8 @@ static long dfu_get_medium_size_sf(struct
dfu_entity*dfu) static intdfu_read_medium_sf(struct dfu_entity *dfu, u64 offset, void *buf, long *len)
{drivers/dfu/dfu_sf.c +1
-1-return spi_flash_read (dfu->data.sf.dev, offset, *len, buf); + return spi_flash_read(dfu->data.sf.dev, dfu->data.sf.start +offset,
drivers/dfu/dfu_sf.c static long dfu_get_medium_size_sf(struct dfu_entity *dfu) · line 27
Quoted 4 lines
drivers/dfu/dfu_sf.c +1
-0+ *len, buf); }static u64 find_sector (struct dfu_entity *dfu,u64 start,u64 offset)
Acked-by Lukasz Majewski <[email protected]>
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group