diff mbox

[v2,1/3] libffs: Remove struct flash_chip from struct ffs_handle

Message ID 1450395738-4145-1-git-send-email-cyril.bur@au1.ibm.com
State Accepted
Headers show

Commit Message

Cyril Bur Dec. 17, 2015, 11:42 p.m. UTC
Simply isn't used anymore since libffs knows how to use the blocklevel
interface.

Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
---
This also means that ffs_update_act_size() hasn't worked for a while. It
*should* have been.

 libflash/libffs.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Stewart Smith Jan. 8, 2016, 12:34 a.m. UTC | #1
Cyril Bur <cyril.bur@au1.ibm.com> writes:
> Simply isn't used anymore since libffs knows how to use the blocklevel
> interface.
>
> Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
> ---

Thanks, series merged as of 42b13e5
diff mbox

Patch

diff --git a/libflash/libffs.c b/libflash/libffs.c
index 5563e52..631f9b8 100644
--- a/libflash/libffs.c
+++ b/libflash/libffs.c
@@ -36,7 +36,6 @@  enum ffs_type {
 struct ffs_handle {
 	struct ffs_hdr		hdr;	/* Converted header */
 	enum ffs_type		type;
-	struct flash_chip	*chip;
 	uint32_t		toc_offset;
 	uint32_t		max_size;
 	void			*cache;
@@ -208,7 +207,6 @@  int ffs_open_image(int fd, uint32_t size, uint32_t toc_offset,
 	f->type = ffs_type_image;
 	f->toc_offset = toc_offset;
 	f->max_size = size;
-	f->chip = NULL;
 
 	/* Convert and check flash header */
 	rc = ffs_check_convert_header(&f->hdr, &hdr);
@@ -385,8 +383,6 @@  int ffs_update_act_size(struct ffs_handle *ffs, uint32_t part_idx,
 	}
 	ent->actual = cpu_to_be32(act_size);
 	ent->checksum = ffs_checksum(ent, FFS_ENTRY_SIZE_CSUM);
-	if (!ffs->chip)
-		return 0;
 
 	return blocklevel_write(ffs->bl, offset, ent, FFS_ENTRY_SIZE);
 }