mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
spi: Use conftest to find return type of .remove of spi_driver struct
Use conftest to determine the return type of .remove() of
struct spi_driver is int or void type instead of kernel version.
The return type got changed with commit a0386bba7093
("spi: make remove callback a void function") in Linux 5.18
Bug 4387902
Change-Id: I644fe0610a76fbc4cea547c3295670599ae919bc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037038
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
49988960d1
commit
9974fda1d2
@@ -147,6 +147,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_dai_ops_struct_has_probe
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_of_get_dai_name_has_index_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_rtd_to_codec
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += simple_util_dai_init
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += spi_driver_struct_remove_return_type_int
|
||||
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
|
||||
|
||||
@@ -7414,6 +7414,23 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_ASOC_SIMPLE_RENAMED_SIMPLE" "" "functions"
|
||||
;;
|
||||
|
||||
spi_driver_struct_remove_return_type_int)
|
||||
#
|
||||
# Determine if return type of .remove function of struct spi_driver is int or void.
|
||||
#
|
||||
# The return type of .remove is changed with commit a0386bba7093 ("spi: make remove
|
||||
# callback a void function") in Linux 5.18.
|
||||
#
|
||||
CODE="
|
||||
#define _LINUX_EFI_H
|
||||
#include <linux/spi/spi.h>
|
||||
int conftest_spi_driver_struct_remove_return_type_int(struct spi_driver *spid) {
|
||||
return spid->remove(NULL);
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_SPI_DRIVER_STRUCT_REMOVE_RETURN_TYPE_INT" "" "types"
|
||||
;;
|
||||
|
||||
tc_taprio_qopt_offload_struct_has_cmd)
|
||||
#
|
||||
# Determine if struct tc_taprio_qopt_offload has a member named cmd
|
||||
|
||||
Reference in New Issue
Block a user