mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
i2c: Use conftest to find return type of .remove of i2c_driver struct
Use conftest to determine the return type of .remove() of
struct i2c_driver is int or void type instead of kernel version.
The return type got changed with commmit ed5c2f5fd10d ("i2c:
Make remove callback return void")
Bug 4387902
Change-Id: Id64466613156e0efaf6cce7492d70cab1c1d1af7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3036799
(cherry picked from commit 1eab65044c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053705
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
14abda2794
commit
5b4a093e24
@@ -119,6 +119,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += get_file_rcu_has_double_ptr_file_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += get_user_pages
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += i2c_driver_struct_probe_without_i2c_device_id_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += i2c_driver_struct_has_probe_new
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += i2c_driver_struct_remove_return_type_int
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += iio_dev_opaque_has_mlock
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += iommu_map_has_gfp_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += kthread_complete_and_exit
|
||||
|
||||
@@ -5434,6 +5434,23 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_I2C_DRIVER_STRUCT_HAS_PROBE_NEW" "" "types"
|
||||
;;
|
||||
|
||||
i2c_driver_struct_remove_return_type_int)
|
||||
#
|
||||
# Determine if return type of .remove function of struct i2c_driver is int or void.
|
||||
#
|
||||
# The return type of .remove is changed with commit ed5c2f5fd10dda ("i2c: Make
|
||||
# remove callback return void") in Linux 6.1.
|
||||
#
|
||||
CODE="
|
||||
#define _LINUX_EFI_H
|
||||
#include <linux/i2c.h>
|
||||
int conftest_i2c_i2c_driver_struct_remove_return_type_int(struct i2c_driver *i2cd) {
|
||||
return i2cd->remove(NULL);
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_I2C_DRIVER_STRUCT_REMOVE_RETURN_TYPE_INT" "" "types"
|
||||
;;
|
||||
|
||||
of_get_named_gpio)
|
||||
#
|
||||
# Determine if of_get_named_gpio() function is present
|
||||
|
||||
Reference in New Issue
Block a user