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: mb1232: 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-181-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
5c5c482e 9d6f774d

+3 -3
+3 -3
drivers/iio/proximity/mb1232.c
··· 180 180 .read_raw = mb1232_read_raw, 181 181 }; 182 182 183 - static int mb1232_probe(struct i2c_client *client, 184 - const struct i2c_device_id *id) 183 + static int mb1232_probe(struct i2c_client *client) 185 184 { 185 + const struct i2c_device_id *id = i2c_client_get_device_id(client); 186 186 struct iio_dev *indio_dev; 187 187 struct mb1232_data *data; 188 188 int ret; ··· 264 264 .name = "maxbotix-mb1232", 265 265 .of_match_table = of_mb1232_match, 266 266 }, 267 - .probe = mb1232_probe, 267 + .probe_new = mb1232_probe, 268 268 .id_table = mb1232_id, 269 269 }; 270 270 module_i2c_driver(mb1232_driver);