diff --git a/drivers/media/i2c/nv_hawk_owl.c b/drivers/media/i2c/nv_hawk_owl.c index 2ec14a8b..05bba14d 100644 --- a/drivers/media/i2c/nv_hawk_owl.c +++ b/drivers/media/i2c/nv_hawk_owl.c @@ -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) { diff --git a/scripts/conftest/Makefile b/scripts/conftest/Makefile index d5a44ea2..893d0320 100644 --- a/scripts/conftest/Makefile +++ b/scripts/conftest/Makefile @@ -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