From: Youngjae Cho Date: Wed, 12 Feb 2025 07:40:13 +0000 (+0900) Subject: common: Use default library name if the given one matches the default X-Git-Tag: accepted/tizen/7.0/unified/20250218.165114^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_7.0_unified;p=platform%2Fhal%2Fapi%2Fcommon.git common: Use default library name if the given one matches the default The hal_common_get_backend_with_library() can give a library name that is totally the same as the default one. If then, use the default one and do not make hashtable entry for the same given one. Change-Id: I0ba489ec815167b03f12ad2fb6eab3cf4bf8f0ca Signed-off-by: Youngjae Cho (cherry picked from commit c57449d2a0abb1b95dd7e395448859de1917edd7) --- diff --git a/src/hal-api-conf.c b/src/hal-api-conf.c index 9495d3b..7977a60 100644 --- a/src/hal-api-conf.c +++ b/src/hal-api-conf.c @@ -81,6 +81,14 @@ static struct __hal_module_info* _get_module_info_with_library_name(enum hal_mod tmp_info->module_name); return NULL; } + +#if defined(__aarch64__) || defined(__x86_64__) || defined (__riscv) + if (g_strcmp0(library_name, tmp_info->library_name_64bit) == 0) +#else + if (g_strcmp0(library_name, tmp_info->library_name) == 0) +#endif + return tmp_info; + library_name_prefix = g_strdup_printf("libhal-backend-%s", tmp_info->backend_module_name); if (!library_name_prefix) {