.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in .probe(). The device_id array has to move up for that to work. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> --- drivers/iio/accel/kxcjk-1013.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c index adc66b3615c0..e043dd698747 100644 --- a/drivers/iio/accel/kxcjk-1013.c +++ b/drivers/iio/accel/kxcjk-1013.c @@ -1432,9 +1432,20 @@ static void kxcjk1013_disable_regulators(void *d) regulator_bulk_disable(ARRAY_SIZE(data->regulators), data->regulators); } -static int kxcjk1013_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static const struct i2c_device_id kxcjk1013_id[] = { + {"kxcjk1013", KXCJK1013}, + {"kxcj91008", KXCJ91008}, + {"kxtj21009", KXTJ21009}, + {"kxtf9", KXTF9}, + {"kx023-1025", KX0231025}, + {"SMO8500", KXCJ91008}, + {} +}; +MODULE_DEVICE_TABLE(i2c, kxcjk1013_id); + +static int kxcjk1013_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_match_id(kxcjk1013_id, client); struct kxcjk1013_data *data; struct iio_dev *indio_dev; struct kxcjk_1013_platform_data *pdata; @@ -1720,18 +1731,6 @@ static const struct acpi_device_id kx_acpi_match[] = { }; MODULE_DEVICE_TABLE(acpi, kx_acpi_match); -static const struct i2c_device_id kxcjk1013_id[] = { - {"kxcjk1013", KXCJK1013}, - {"kxcj91008", KXCJ91008}, - {"kxtj21009", KXTJ21009}, - {"kxtf9", KXTF9}, - {"kx023-1025", KX0231025}, - {"SMO8500", KXCJ91008}, - {} -}; - -MODULE_DEVICE_TABLE(i2c, kxcjk1013_id); - static const struct of_device_id kxcjk1013_of_match[] = { { .compatible = "kionix,kxcjk1013", }, { .compatible = "kionix,kxcj91008", }, @@ -1749,7 +1748,7 @@ static struct i2c_driver kxcjk1013_driver = { .of_match_table = kxcjk1013_of_match, .pm = &kxcjk1013_pm_ops, }, - .probe = kxcjk1013_probe, + .probe_new = kxcjk1013_probe, .remove = kxcjk1013_remove, .id_table = kxcjk1013_id, }; -- 2.37.2