mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
soc: rockchip: mtd_vendor_storage: Change vendor storage item size realloc strategy
Item size is calculated according to the actual space used Change-Id: I7133368130689f792f05e82fea04ebf16a755a37 Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
@@ -259,8 +259,7 @@ static int mtd_vendor_write(u32 id, void *pbuf, u32 size)
|
||||
item->size = size;
|
||||
memcpy(&p_data[item->offset], pbuf, size);
|
||||
g_vendor->free_offset = offset + align_size;
|
||||
g_vendor->free_size -= (align_size -
|
||||
alloc_size);
|
||||
g_vendor->free_size = sizeof(g_vendor->data) - g_vendor->free_offset;
|
||||
} else {
|
||||
memcpy(&p_data[item->offset],
|
||||
pbuf,
|
||||
|
||||
Reference in New Issue
Block a user