media: nv_hawk_owl: Use conftest instead of linux version

use conftest to determine if function i2c_new_device() present
or not instead of the Linux version.
This function is removed with commit 390fd0475af5
("i2c: remove deprecated i2c_new_device API")

Bug 4387902

Change-Id: Ie69a06b486745416ec104fea8359403e589a5cc7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037916
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Laxman Dewangan
2023-12-19 08:43:58 +00:00
committed by mobile promotions
parent e49269929e
commit 90e2ac6ac7
2 changed files with 4 additions and 3 deletions

View File

@@ -1032,11 +1032,11 @@ static int ar0234_eeprom_device_init(struct ar0234 *priv)
/* assign the EEPROM addrs which is read from DT */ /* assign the EEPROM addrs which is read from DT */
priv->eeprom[i].brd.addr = pdata->eeprom_id_addr + i; priv->eeprom[i].brd.addr = pdata->eeprom_id_addr + i;
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0) #if defined(NV_I2C_NEW_CLIENT_DEVICE_PRESENT) /* Linux 5.10 */
priv->eeprom[i].i2c_client = i2c_new_device( priv->eeprom[i].i2c_client = i2c_new_client_device(
priv->eeprom[i].adap, &priv->eeprom[i].brd); priv->eeprom[i].adap, &priv->eeprom[i].brd);
#else #else
priv->eeprom[i].i2c_client = i2c_new_client_device( priv->eeprom[i].i2c_client = i2c_new_device(
priv->eeprom[i].adap, &priv->eeprom[i].brd); priv->eeprom[i].adap, &priv->eeprom[i].brd);
#endif #endif
if (!priv->eeprom[i].i2c_client) { if (!priv->eeprom[i].i2c_client) {

View File

@@ -119,6 +119,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_ops_get_set_coalesce_has_coal_and_
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_ops_get_set_ringparam_has_ringparam_and_extack_args NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_ops_get_set_ringparam_has_ringparam_and_extack_args
NV_CONFTEST_FUNCTION_COMPILE_TESTS += get_file_rcu_has_double_ptr_file_arg 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 += get_user_pages
NV_CONFTEST_FUNCTION_COMPILE_TESTS += i2c_new_client_device
NV_CONFTEST_FUNCTION_COMPILE_TESTS += i2c_driver_struct_probe_without_i2c_device_id_arg 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_has_probe_new
NV_CONFTEST_FUNCTION_COMPILE_TESTS += i2c_driver_struct_remove_return_type_int NV_CONFTEST_FUNCTION_COMPILE_TESTS += i2c_driver_struct_remove_return_type_int