media: Use conftest to find if enum v4l2_async_match_type present

Use conftest to determine if the 'enum v4l2_async_match_type'
has the "TYPE" in its name.

In Linux 6.5, with change commit 7a2259fc5182b ("media: v4l: async:
Rename V4L2_ASYNC_MATCH_ macros, add TYPE_"), the enum names has "TYPE" also.

Bug 4346767

Change-Id: I863da8496337d4003188b654673c67cdb3eef155
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028745
(cherry picked from commit 5f77d6d51a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053707
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Laxman Dewangan
2023-12-05 19:12:50 +00:00
committed by mobile promotions
parent afe9bdc7c0
commit 711d4aee8d
4 changed files with 19 additions and 5 deletions

View File

@@ -151,6 +151,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += tegra_ivc_struct_has_iosys_map
NV_CONFTEST_FUNCTION_COMPILE_TESTS += tty_operations_struct_write_has_u8_ptr_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += tty_operations_struct_set_termios_has_const_ktermios_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_async_connection_struct_present
NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_async_match_type_enum_present
NV_CONFTEST_FUNCTION_COMPILE_TESTS += vm_area_struct_has_const_vm_flags
NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_present_drm_gem_prime_fd_to_handle
NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_present_drm_gem_prime_handle_to_fd

View File

@@ -7493,6 +7493,22 @@ compile_test() {
compile_check_conftest "$CODE" "NV_V4L2_ASYNC_CONNECTION_STRUCT_PRESENT" "" "types"
;;
v4l2_async_match_type_enum_present)
#
# Determine if the 'enum v4l2_async_match_type' has the "TYPE" in its name.
#
# In Linux 6.5, with change commit 7a2259fc5182b ("media: v4l: async:
# Rename V4L2_ASYNC_MATCH_ macros, add TYPE_"), the enum names has "TYPE" also.
#
CODE="
#include <media/v4l2-async.h>
int conftest_v4l2_async_match_type_enum_present(void) {
return V4L2_ASYNC_MATCH_TYPE_I2C;
}"
compile_check_conftest "$CODE" "NV_V4L2_ASYNC_MATCH_TYPE_ENUM_PRESENT" "" "types"
;;
# When adding a new conftest entry, please use the correct format for
# specifying the relevant upstream Linux kernel commit.
#