From e8faf2f2adeb9066de3c968a57803bb262f61ee1 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Tue, 18 Jan 2022 18:57:06 +0000 Subject: buflib: add a common dummy callbacks struct & use it There are various allocations that can't be moved or shrunk. Provide a global callback struct for this use case instead of making each caller declare its own dummy struct. Also fixed ROLO and x1000 installer code which incorrectly used movable allocations. Change-Id: I00088396b9826e02e69a4a33477fe1a7816374f1 --- lib/x1000-installer/src/xf_nandio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/x1000-installer/src/xf_nandio.c') diff --git a/lib/x1000-installer/src/xf_nandio.c b/lib/x1000-installer/src/xf_nandio.c index ba79cbbcbf..29ff9d9120 100644 --- a/lib/x1000-installer/src/xf_nandio.c +++ b/lib/x1000-installer/src/xf_nandio.c @@ -51,7 +51,7 @@ int xf_nandio_init(struct xf_nandio* nio) alloc_size += CACHEALIGN_SIZE - 1; alloc_size += nio->block_size * 2; - nio->alloc_handle = core_alloc("xf_nandio", alloc_size); + nio->alloc_handle = core_alloc_ex("xf_nandio", alloc_size, &buflib_ops_locked); if(nio->alloc_handle < 0) { rc = XF_E_OUT_OF_MEMORY; goto out_nclose; -- cgit v1.2.3