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

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

authored by

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

+3 -3
+3 -3
drivers/iio/adc/ad799x.c
··· 775 775 }, 776 776 }; 777 777 778 - static int ad799x_probe(struct i2c_client *client, 779 - const struct i2c_device_id *id) 778 + static int ad799x_probe(struct i2c_client *client) 780 779 { 780 + const struct i2c_device_id *id = i2c_client_get_device_id(client); 781 781 int ret; 782 782 int extra_config = 0; 783 783 struct ad799x_state *st; ··· 968 968 .name = "ad799x", 969 969 .pm = pm_sleep_ptr(&ad799x_pm_ops), 970 970 }, 971 - .probe = ad799x_probe, 971 + .probe_new = ad799x_probe, 972 972 .remove = ad799x_remove, 973 973 .id_table = ad799x_id, 974 974 };