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

of: unittest: Convert to i2c's .probe_new()

In struct i2c_driver, field new_probe replaces the soon to be deprecated
field probe. Update unittest for this change. The probe function
doesn't make use of the i2c_device_id * parameter so it can be trivially
converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Frank Rowand <frowand.list@gmail.com>
Link: https://lore.kernel.org/r/20221118224540.619276-510-uwe@kleine-koenig.org
[robh: Add Frank's commit msg addition]
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Uwe Kleine-König and committed by
Rob Herring
11b93281 3c75ce7c

+4 -6
+4 -6
drivers/of/unittest.c
··· 2508 2508 }, 2509 2509 }; 2510 2510 2511 - static int unittest_i2c_dev_probe(struct i2c_client *client, 2512 - const struct i2c_device_id *id) 2511 + static int unittest_i2c_dev_probe(struct i2c_client *client) 2513 2512 { 2514 2513 struct device *dev = &client->dev; 2515 2514 struct device_node *np = client->dev.of_node; ··· 2540 2541 .driver = { 2541 2542 .name = "unittest-i2c-dev", 2542 2543 }, 2543 - .probe = unittest_i2c_dev_probe, 2544 + .probe_new = unittest_i2c_dev_probe, 2544 2545 .remove = unittest_i2c_dev_remove, 2545 2546 .id_table = unittest_i2c_dev_id, 2546 2547 }; ··· 2552 2553 return 0; 2553 2554 } 2554 2555 2555 - static int unittest_i2c_mux_probe(struct i2c_client *client, 2556 - const struct i2c_device_id *id) 2556 + static int unittest_i2c_mux_probe(struct i2c_client *client) 2557 2557 { 2558 2558 int i, nchans; 2559 2559 struct device *dev = &client->dev; ··· 2617 2619 .driver = { 2618 2620 .name = "unittest-i2c-mux", 2619 2621 }, 2620 - .probe = unittest_i2c_mux_probe, 2622 + .probe_new = unittest_i2c_mux_probe, 2621 2623 .remove = unittest_i2c_mux_remove, 2622 2624 .id_table = unittest_i2c_mux_id, 2623 2625 };