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

iio: imu: bmi160/bmi160_i2c: 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-108-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
97202c55 e6b61055

+3 -3
+3 -3
drivers/iio/imu/bmi160/bmi160_i2c.c
··· 15 15 16 16 #include "bmi160.h" 17 17 18 - static int bmi160_i2c_probe(struct i2c_client *client, 19 - const struct i2c_device_id *id) 18 + static int bmi160_i2c_probe(struct i2c_client *client) 20 19 { 20 + const struct i2c_device_id *id = i2c_client_get_device_id(client); 21 21 struct regmap *regmap; 22 22 const char *name; 23 23 ··· 60 60 .acpi_match_table = bmi160_acpi_match, 61 61 .of_match_table = bmi160_of_match, 62 62 }, 63 - .probe = bmi160_i2c_probe, 63 + .probe_new = bmi160_i2c_probe, 64 64 .id_table = bmi160_i2c_id, 65 65 }; 66 66 module_i2c_driver(bmi160_i2c_driver);