mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
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:
committed by
mobile promotions
parent
e49269929e
commit
90e2ac6ac7
@@ -1032,11 +1032,11 @@ static int ar0234_eeprom_device_init(struct ar0234 *priv)
|
||||
|
||||
/* assign the EEPROM addrs which is read from DT */
|
||||
priv->eeprom[i].brd.addr = pdata->eeprom_id_addr + i;
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
|
||||
priv->eeprom[i].i2c_client = i2c_new_device(
|
||||
#if defined(NV_I2C_NEW_CLIENT_DEVICE_PRESENT) /* Linux 5.10 */
|
||||
priv->eeprom[i].i2c_client = i2c_new_client_device(
|
||||
priv->eeprom[i].adap, &priv->eeprom[i].brd);
|
||||
#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);
|
||||
#endif
|
||||
if (!priv->eeprom[i].i2c_client) {
|
||||
|
||||
@@ -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 += get_file_rcu_has_double_ptr_file_arg
|
||||
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_has_probe_new
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += i2c_driver_struct_remove_return_type_int
|
||||
|
||||
Reference in New Issue
Block a user