habanalabs: add put by handle method to memory manager
authorYuri Nudelman <ynudelman@habana.ai>
Thu, 31 Mar 2022 11:15:16 +0000 (14:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 May 2022 19:01:19 +0000 (21:01 +0200)
commitff086c186bf2b2237410ce9145c16d2141a881ff
treee884f93a4522a1d2dfe2811f8f0c6fd846415b41
parent4e63ce6af63f3db7f922e3c564f23ac606218a3d
habanalabs: add put by handle method to memory manager

Putting object by its handle and not by object pointer is useful in
some finalization flows that do not have object pointer available.
It eliminates the need to first get the object and then perform
put twice.

Signed-off-by: Yuri Nudelman <ynudelman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/memory_mgr.c