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

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

authored by

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

+3 -3
+3 -3
drivers/iio/imu/fxos8700_i2c.c
··· 18 18 19 19 #include "fxos8700.h" 20 20 21 - static int fxos8700_i2c_probe(struct i2c_client *client, 22 - const struct i2c_device_id *id) 21 + static int fxos8700_i2c_probe(struct i2c_client *client) 23 22 { 23 + const struct i2c_device_id *id = i2c_client_get_device_id(client); 24 24 struct regmap *regmap; 25 25 const char *name = NULL; 26 26 ··· 60 60 .acpi_match_table = ACPI_PTR(fxos8700_acpi_match), 61 61 .of_match_table = fxos8700_of_match, 62 62 }, 63 - .probe = fxos8700_i2c_probe, 63 + .probe_new = fxos8700_i2c_probe, 64 64 .id_table = fxos8700_i2c_id, 65 65 }; 66 66 module_i2c_driver(fxos8700_i2c_driver);