diff options
author | Yunhee Seo <yuni.seo@samsung.com> | 2024-04-09 21:37:53 +0900 |
---|---|---|
committer | Yunhee Seo <yuni.seo@samsung.com> | 2024-04-09 21:37:53 +0900 |
commit | d8dc8f1b58166189b505a51871e5c74bdee9ca95 (patch) | |
tree | 5cb3be508238103b84804ad766286113128a7537 | |
parent | 1d60541b8ad00958ac91be141c1e88559ec90173 (diff) | |
download | device-c4-d8dc8f1b58166189b505a51871e5c74bdee9ca95.tar.gz device-c4-d8dc8f1b58166189b505a51871e5c74bdee9ca95.tar.bz2 device-c4-d8dc8f1b58166189b505a51871e5c74bdee9ca95.zip |
board: Apply HAL ABI versioning
To support OS upgrade feature, hal-backend and hal-api module needs HAL ABI versioning.
So, major/minor version is added to hal_backend structure.
While applying HAL ABI versioning, hal_backend_[module]_funcs is allocated from hal-api-[module] side.
Thus, allocation is moved to hal-api-device-board side.
Change-Id: I87306793816c393fc2db451bafc1e09bb4eec202
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
-rw-r--r-- | hw/board/board.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/hw/board/board.c b/hw/board/board.c index b398c77..3451652 100644 --- a/hw/board/board.c +++ b/hw/board/board.c @@ -102,14 +102,17 @@ static int board_init(void **data) { hal_backend_device_board_funcs *device_board_funcs; - device_board_funcs = calloc(1, sizeof(hal_backend_device_board_funcs)); + if (!data) { + _E("Invalid parameter"); + return -EINVAL; + } + + device_board_funcs = *(hal_backend_device_board_funcs **) data; if (!device_board_funcs) - return -ENOMEM; + return -EINVAL; device_board_funcs->get_device_serial_number = get_device_serial_number; - *data = (void *)device_board_funcs; - return 0; } @@ -128,4 +131,6 @@ hal_backend EXPORT hal_backend_device_board_data = { .abi_version = HAL_ABI_VERSION_TIZEN_7_0, .init = board_init, .exit = board_exit, + .major_version = 1, + .minor_version = 0, }; |