mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
media: camera: Update conftest for gpio_device_find
When adding conftest tests for detecting if specific functions are present, it is always better to check if the newly added function is present versus the function that has been removed. The reason being that is the newly added function is modified in the future then the conftest tests can be extended to check for updates to the function. Therefore, instead of checking if the function gpiochip_find() is present, which was removed in Linux v6.7, check if the function gpio_device_find() is present, which replaced gpiochip_find in Linux v6.7. Bug 4346767 Bug 4471899 Change-Id: I32bf1c3da32abbf3c8d3ef9ea350decf1564e0bc Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108643 Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
a3466295e1
commit
68e7840dd8
@@ -136,7 +136,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_set_tso_max_size
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_napi_add_weight
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += of_get_named_gpio_flags
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += gpio_chip_struct_has_of_node_present
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += gpiochip_find
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += gpio_device_find
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pwm_chip_struct_has_base_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pwm_ops_struct_has_owner
|
||||
|
||||
@@ -5524,24 +5524,6 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_GPIO_CHIP_STRUCT_HAS_OF_NODE_PRESENT" "" "types"
|
||||
;;
|
||||
|
||||
gpiochip_find)
|
||||
#
|
||||
# Determine if function gpiochip_find() present or not.
|
||||
#
|
||||
# The function gpiochip_find() is removed from commit 2654521d774f9
|
||||
# ("gpiolib: remove gpiochip_find()" in Linux 6.7
|
||||
#
|
||||
CODE="
|
||||
#include <linux/gpio/driver.h>
|
||||
void conftest_gpiochip_find_present(void)
|
||||
{
|
||||
gpiochip_find();
|
||||
}
|
||||
"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_GPIOCHIP_FIND_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
devm_gpio_request_one)
|
||||
#
|
||||
# Determine if devm_gpio_request_one() function is present
|
||||
@@ -7095,6 +7077,26 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_GENDPD_XLATE_T_HAS_CONST_OF_PHANDLE_ARGS" "" "types"
|
||||
;;
|
||||
|
||||
gpio_device_find)
|
||||
#
|
||||
# Determine if function gpio_device_find() present.
|
||||
#
|
||||
# The function gpio_device_find() was add by commit cfe102f63308
|
||||
# ("gpiolib: provide gpio_device_find()") in Linux v6.7 replacing
|
||||
# the legacy and broken gpiochip_find(), which has since been
|
||||
# removed.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/gpio/driver.h>
|
||||
void conftest_gpio_device_find(void)
|
||||
{
|
||||
gpio_device_find();
|
||||
}
|
||||
"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_GPIO_DEVICE_FIND_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
netif_set_tso_max_size)
|
||||
#
|
||||
# Determine if netif_set_tso_max_size() function is present
|
||||
|
||||
Reference in New Issue
Block a user