Skip to content

Commit 87a3db6

Browse files
Jon Linrkhuangtao
authored andcommitted
soc: rockchip: flash_vendor_storage: Change vendor storage item size realloc strategy
Item size is calculated according to the actual space used Change-Id: I7e4ce774a16d665a33e411991dc6dc767e1aba93 Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
1 parent 5871158 commit 87a3db6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/soc/rockchip/flash_vendor_storage.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,7 @@ static int flash_vendor_write(u32 id, void *pbuf, u32 size)
173173
item->size = size;
174174
memcpy(&p_data[item->offset], pbuf, size);
175175
g_vendor->free_offset = offset + align_size;
176-
g_vendor->free_size -= (align_size -
177-
alloc_size);
176+
g_vendor->free_size = sizeof(g_vendor->data) - g_vendor->free_offset;
178177
} else {
179178
memcpy(&p_data[item->offset],
180179
pbuf,

0 commit comments

Comments
 (0)