]> www.infradead.org Git - users/jedix/linux-maple.git/commit
udmabuf: introduce udmabuf init and deinit helper
authorHuan Yang <link@vivo.com>
Wed, 18 Sep 2024 02:52:28 +0000 (10:52 +0800)
committerVivek Kasireddy <vivek.kasireddy@intel.com>
Fri, 20 Sep 2024 21:07:33 +0000 (14:07 -0700)
commit5d8157961fd183ce2a9be1f4fd9c775ae9e94536
treeacd0d73accc1dd7dd50e7a9f9c4764f01e1764ce
parent164fd9efd46531fddfaa933d394569259896642b
udmabuf: introduce udmabuf init and deinit helper

After udmabuf is allocated, its resources need to be initialized,
including various array structures. The current array structure has
already been greatly expanded.

Also, before udmabuf needs to be kfree, the occupied resources need to
be released.

This part is repetitive and maybe overlooked.

This patch give a helper function when init and deinit, by this,
reduce duplicate code.

Signed-off-by: Huan Yang <link@vivo.com>
Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240918025238.2957823-6-link@vivo.com
drivers/dma-buf/udmabuf.c