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/9.0/unified/20250220.165931~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e86cbb142b09f4380ab36e6239d525a2b60f2e24;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 --- diff --git a/src/hal-api-conf.c b/src/hal-api-conf.c index e373ef1..ab19bdf 100644 --- a/src/hal-api-conf.c +++ b/src/hal-api-conf.c @@ -79,6 +79,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) {