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

iio: adc: ltc2497: 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-66-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
3a798444 11e67cc9

+3 -3
+3 -3
drivers/iio/adc/ltc2497.c
··· 94 94 return ret; 95 95 } 96 96 97 - static int ltc2497_probe(struct i2c_client *client, 98 - const struct i2c_device_id *id) 97 + static int ltc2497_probe(struct i2c_client *client) 99 98 { 99 + const struct i2c_device_id *id = i2c_client_get_device_id(client); 100 100 const struct ltc2497_chip_info *chip_info; 101 101 struct iio_dev *indio_dev; 102 102 struct ltc2497_driverdata *st; ··· 165 165 .name = "ltc2497", 166 166 .of_match_table = ltc2497_of_match, 167 167 }, 168 - .probe = ltc2497_probe, 168 + .probe_new = ltc2497_probe, 169 169 .remove = ltc2497_remove, 170 170 .id_table = ltc2497_id, 171 171 };