media: Use conftest to find if struct v4l2_async_connection present

Use conftest to find if struct v4l2_async_connection present
or not. The struct v4l2_async_subdev is renamed to struct
v4l2_async_connection with change commit adb2dcd5f2d49d3
("media: v4l: async: Rename v4l2_async_subdev as v4l2_async_connection")
in Linux 6.5

Bug 4346767

Change-Id: Id15c8ce747a8642b7831b79f45e15f26e95744b2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028744
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Laxman Dewangan
2023-12-05 18:51:47 +00:00
committed by mobile promotions
parent 350a86106e
commit 234ba9c75f
5 changed files with 26 additions and 6 deletions

View File

@@ -142,6 +142,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += tc_taprio_qopt_offload_struct_has_cmd
NV_CONFTEST_FUNCTION_COMPILE_TESTS += tegra_dev_iommu_get_stream_id
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 += v4l2_async_connection_struct_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

@@ -7325,6 +7325,23 @@ compile_test() {
compile_check_conftest "$CODE" "NV_TTY_OPERATIONS_STRUCT_WRITE_HAS_U8_PTR_ARG" "" "functions"
;;
v4l2_async_connection_struct_present)
#
# Determine if the 'struct v4l2_async_connection' present or not.
#
# The struct v4l2_async_subdev is renamed to v4l2_async_connection with change
# commit adb2dcd5f2d49d3 ("media: v4l: async: Rename v4l2_async_subdev
# as v4l2_async_connection") in Linux 6.5
#
CODE="
#include <media/v4l2-async.h>
int conftest_v4l2_async_connection_struct_present(void) {
return offsetof(struct v4l2_async_connection, match);
}"
compile_check_conftest "$CODE" "NV_V4L2_ASYNC_CONNECTION_STRUCT_PRESENT" "" "types"
;;
# When adding a new conftest entry, please use the correct format for
# specifying the relevant upstream Linux kernel commit.
#