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

iio: health: max30102: 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-100-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
15818f08 3ef7e6e0

+3 -3
+3 -3
drivers/iio/health/max30102.c
··· 513 513 .read_raw = max30102_read_raw, 514 514 }; 515 515 516 - static int max30102_probe(struct i2c_client *client, 517 - const struct i2c_device_id *id) 516 + static int max30102_probe(struct i2c_client *client) 518 517 { 518 + const struct i2c_device_id *id = i2c_client_get_device_id(client); 519 519 struct max30102_data *data; 520 520 struct iio_dev *indio_dev; 521 521 int ret; ··· 631 631 .name = MAX30102_DRV_NAME, 632 632 .of_match_table = max30102_dt_ids, 633 633 }, 634 - .probe = max30102_probe, 634 + .probe_new = max30102_probe, 635 635 .remove = max30102_remove, 636 636 .id_table = max30102_id, 637 637 };