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

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

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
fe44f073 50434e46

+3 -3
+3 -3
drivers/iio/adc/ad7091r5.c
··· 69 69 .vref_mV = 2500, 70 70 }; 71 71 72 - static int ad7091r5_i2c_probe(struct i2c_client *i2c, 73 - const struct i2c_device_id *id) 72 + static int ad7091r5_i2c_probe(struct i2c_client *i2c) 74 73 { 74 + const struct i2c_device_id *id = i2c_client_get_device_id(i2c); 75 75 const struct ad7091r_chip_info *chip_info; 76 76 struct regmap *map = devm_regmap_init_i2c(i2c, &ad7091r_regmap_config); 77 77 ··· 103 103 .name = "ad7091r5", 104 104 .of_match_table = ad7091r5_dt_ids, 105 105 }, 106 - .probe = ad7091r5_i2c_probe, 106 + .probe_new = ad7091r5_i2c_probe, 107 107 .id_table = ad7091r5_i2c_ids, 108 108 }; 109 109 module_i2c_driver(ad7091r5_driver);