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

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

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
3ff5dd78 fe44f073

+3 -3
+3 -3
drivers/iio/adc/ad7291.c
··· 465 465 regulator_disable(reg); 466 466 } 467 467 468 - static int ad7291_probe(struct i2c_client *client, 469 - const struct i2c_device_id *id) 468 + static int ad7291_probe(struct i2c_client *client) 470 469 { 470 + const struct i2c_device_id *id = i2c_client_get_device_id(client); 471 471 struct ad7291_chip_info *chip; 472 472 struct iio_dev *indio_dev; 473 473 int ret; ··· 553 553 .name = KBUILD_MODNAME, 554 554 .of_match_table = ad7291_of_match, 555 555 }, 556 - .probe = ad7291_probe, 556 + .probe_new = ad7291_probe, 557 557 .id_table = ad7291_id, 558 558 }; 559 559 module_i2c_driver(ad7291_driver);