.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/mma9553.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/iio/accel/mma9553.c b/drivers/iio/accel/mma9553.c index 2da0e005b13e..0aa6f2092108 100644 --- a/drivers/iio/accel/mma9553.c +++ b/drivers/iio/accel/mma9553.c @@ -1073,9 +1073,16 @@ static const char *mma9553_match_acpi_device(struct device *dev) return dev_name(dev); } -static int mma9553_probe(struct i2c_client *client, - const struct i2c_device_id *id) + +static const struct i2c_device_id mma9553_id[] = { + {"mma9553", 0}, + {}, +}; +MODULE_DEVICE_TABLE(i2c, mma9553_id); + +static int mma9553_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_match_id(mma9553_id, client); struct mma9553_data *data; struct iio_dev *indio_dev; const char *name = NULL; @@ -1230,23 +1237,15 @@ static const struct acpi_device_id mma9553_acpi_match[] = { {"MMA9553", 0}, {}, }; - MODULE_DEVICE_TABLE(acpi, mma9553_acpi_match); -static const struct i2c_device_id mma9553_id[] = { - {"mma9553", 0}, - {}, -}; - -MODULE_DEVICE_TABLE(i2c, mma9553_id); - static struct i2c_driver mma9553_driver = { .driver = { .name = MMA9553_DRV_NAME, .acpi_match_table = ACPI_PTR(mma9553_acpi_match), .pm = pm_ptr(&mma9553_pm_ops), }, - .probe = mma9553_probe, + .probe_new = mma9553_probe, .remove = mma9553_remove, .id_table = mma9553_id, }; -- 2.37.2