diff options
author | Yunhee Seo <yuni.seo@samsung.com> | 2024-04-09 21:35:46 +0900 |
---|---|---|
committer | Yunhee Seo <yuni.seo@samsung.com> | 2024-04-09 21:35:46 +0900 |
commit | 90438123dfda9f60eac4a7fce7b917384eceed11 (patch) | |
tree | d61eb8d712fe1edd28d1873a3a8ababd98ad485c | |
parent | c2666ba2bec665de3267966abc78865eafff4652 (diff) | |
download | device-c4-90438123dfda9f60eac4a7fce7b917384eceed11.tar.gz device-c4-90438123dfda9f60eac4a7fce7b917384eceed11.tar.bz2 device-c4-90438123dfda9f60eac4a7fce7b917384eceed11.zip |
display: 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-display side.
Change-Id: Ia8b2499864154b0e469d15863d688c49f565374d
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
-rw-r--r-- | hw/display/display.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/hw/display/display.c b/hw/display/display.c index acbb421..3b58615 100644 --- a/hw/display/display.c +++ b/hw/display/display.c @@ -109,16 +109,19 @@ static int display_init(void **data) { hal_backend_device_display_funcs *device_display_funcs; - device_display_funcs = calloc(1, sizeof(hal_backend_device_display_funcs)); + if (!data) { + _E("Invalid parameter"); + return -EINVAL; + } + + device_display_funcs = *(hal_backend_device_display_funcs **) data; if (!device_display_funcs) - return -ENOMEM; + return -EINVAL; device_display_funcs->get_max_brightness = display_get_max_brightness; device_display_funcs->get_brightness = display_get_brightness; device_display_funcs->set_brightness = display_set_brightness; - *data = (void *)device_display_funcs; - return 0; } @@ -137,4 +140,6 @@ hal_backend EXPORT hal_backend_device_display_data = { .abi_version = HAL_ABI_VERSION_TIZEN_7_0, .init = display_init, .exit = display_exit, + .major_version = 1, + .minor_version = 0, }; |