Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: imu: kmx61: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-111-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
4bf718bc 4f218ae0

+3 -3
+3 -3
drivers/iio/imu/kmx61.c
··· 1276 1276 return trig; 1277 1277 } 1278 1278 1279 - static int kmx61_probe(struct i2c_client *client, 1280 - const struct i2c_device_id *id) 1279 + static int kmx61_probe(struct i2c_client *client) 1281 1280 { 1281 + const struct i2c_device_id *id = i2c_client_get_device_id(client); 1282 1282 int ret; 1283 1283 struct kmx61_data *data; 1284 1284 const char *name = NULL; ··· 1517 1517 .acpi_match_table = ACPI_PTR(kmx61_acpi_match), 1518 1518 .pm = pm_ptr(&kmx61_pm_ops), 1519 1519 }, 1520 - .probe = kmx61_probe, 1520 + .probe_new = kmx61_probe, 1521 1521 .remove = kmx61_remove, 1522 1522 .id_table = kmx61_id, 1523 1523 };