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

Configure Feed

Select the types of activity you want to include in your feed.

iio: proximity: srf08: 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-184-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
038b0fac 576eb2b0

+3 -3
+3 -3
drivers/iio/proximity/srf08.c
··· 443 443 .read_raw = srf08_read_raw, 444 444 }; 445 445 446 - static int srf08_probe(struct i2c_client *client, 447 - const struct i2c_device_id *id) 446 + static int srf08_probe(struct i2c_client *client) 448 447 { 448 + const struct i2c_device_id *id = i2c_client_get_device_id(client); 449 449 struct iio_dev *indio_dev; 450 450 struct srf08_data *data; 451 451 int ret; ··· 549 549 .name = "srf08", 550 550 .of_match_table = of_srf08_match, 551 551 }, 552 - .probe = srf08_probe, 552 + .probe_new = srf08_probe, 553 553 .id_table = srf08_id, 554 554 }; 555 555 module_i2c_driver(srf08_driver);