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

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

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
6168215d d59ecbc4

+3 -3
+3 -3
drivers/iio/adc/mcp3422.c
··· 330 330 .attrs = &mcp3422_attribute_group, 331 331 }; 332 332 333 - static int mcp3422_probe(struct i2c_client *client, 334 - const struct i2c_device_id *id) 333 + static int mcp3422_probe(struct i2c_client *client) 335 334 { 335 + const struct i2c_device_id *id = i2c_client_get_device_id(client); 336 336 struct iio_dev *indio_dev; 337 337 struct mcp3422 *adc; 338 338 int err; ··· 417 417 .name = "mcp3422", 418 418 .of_match_table = mcp3422_of_match, 419 419 }, 420 - .probe = mcp3422_probe, 420 + .probe_new = mcp3422_probe, 421 421 .id_table = mcp3422_id, 422 422 }; 423 423 module_i2c_driver(mcp3422_driver);