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

iio: magnetometer: yamaha-yas530: 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-160-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
fcd96967 e7a45a76

+3 -3
+3 -3
drivers/iio/magnetometer/yamaha-yas530.c
··· 1384 1384 }, 1385 1385 }; 1386 1386 1387 - static int yas5xx_probe(struct i2c_client *i2c, 1388 - const struct i2c_device_id *id) 1387 + static int yas5xx_probe(struct i2c_client *i2c) 1389 1388 { 1389 + const struct i2c_device_id *id = i2c_client_get_device_id(i2c); 1390 1390 struct iio_dev *indio_dev; 1391 1391 struct device *dev = &i2c->dev; 1392 1392 struct yas5xx *yas5xx; ··· 1605 1605 .of_match_table = yas5xx_of_match, 1606 1606 .pm = pm_ptr(&yas5xx_dev_pm_ops), 1607 1607 }, 1608 - .probe = yas5xx_probe, 1608 + .probe_new = yas5xx_probe, 1609 1609 .remove = yas5xx_remove, 1610 1610 .id_table = yas5xx_id, 1611 1611 };