mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +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
(cherry picked from commit 32516f4878)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053703
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
9c2c4a695c
commit
a39a2be24e
@@ -146,6 +146,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 += 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
|
||||
|
||||
@@ -7406,6 +7406,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"
|
||||
;;
|
||||
|
||||
# When adding a new conftest entry, please use the correct format for
|
||||
# specifying the relevant upstream Linux kernel commit.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user