halapi: Split the internal functions finely to get flexibility 15/257515/3
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 22 Apr 2021 10:12:04 +0000 (19:12 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 28 Apr 2021 06:19:19 +0000 (15:19 +0900)
commitcffb4836e9887964dc595b6e63a271e0ce216c0d
treeb386ff99d3dc577fe81ec34f2bc8306487c370b5
parent9c3b2bc76bb5cbfd35322fa2a1c37735ad6b585c
halapi: Split the internal functions finely to get flexibility

New functions will use only __open_backend() without __close_backend()
in order to get the data of hal_backend structure. But this code have
been tightly coupled implemented in __get_backend and __put_backend.
In order to make the code more flexibility, split __get_backend/__put_backend
finley to two steps such as open/close and init/exit.

[Simple description for functions]
- __open_backend() : Open backend library and get backend symbol
- __close_backend() : Close backend library
- __init_backend() : After getting backend, initialize HAL backend driver
- __exit_backend() : After getting backend, exit HAL backend driver
- __get_backend()
__open_backend()
__init_backend()
Increase usage_count
- __put_backend()
__exit_backen()
__close_backend()
Decrease usage_count

[Change variable name in struct __hal_module_info]
- library_backend -> backend
- library_handle -> handle

Change-Id: I358e3f4db1991d26c8cf0498b3f37ec543da3e38
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/common.h
src/hal-api-common.c