mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
serial: Use conftest to find if uart_ops has set_termios has const arg
Use conftest to determine if set_termios of struct uart_ops
has const type argument or not. The argument type is changed
from commit bec5b814d46c ("serial: Make ->set_termios() old
ktermios const") in Linux 6.1
Bug 4387902
Change-Id: I175aac51ac2c2b99b9eedc69260ccb6b0c38571e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037040
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
b7cbe748e1
commit
32516f4878
@@ -153,6 +153,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 += tty_operations_struct_set_termios_has_const_ktermios_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ufs_hba_variant_ops_suspend_has_status_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_async_connection_struct_present
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_async_match_type_enum_present
|
||||
|
||||
@@ -7521,6 +7521,25 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_TTY_OPERATIONS_STRUCT_WRITE_HAS_U8_PTR_ARG" "" "functions"
|
||||
;;
|
||||
|
||||
tty_operations_struct_set_termios_has_const_ktermios_arg)
|
||||
#
|
||||
# Determine if the function set_termios of tty_operations struct has the const type argument or not.
|
||||
#
|
||||
# The callback function of tty_operations has the const type argument from the commit bec5b814d46c
|
||||
# ("serial: Make ->set_termios() old ktermios const") in Linux 6.1.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/tty.h>
|
||||
#include <linux/tty_driver.h>
|
||||
static inline void test_set_termios(struct tty_struct *tty, const struct ktermios *old) {
|
||||
}
|
||||
static struct tty_operations tty_ops = {
|
||||
.set_termios = test_set_termios,
|
||||
};"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_TTY_OPERATIONS_STRUCT_SET_TERMIOS_HAS_CONST_KTERMIOS_ARG" "" "types"
|
||||
;;
|
||||
|
||||
ufs_hba_variant_ops_suspend_has_status_arg)
|
||||
#
|
||||
# Determine if the 'suspend' function for the
|
||||
|
||||
Reference in New Issue
Block a user