iio: chemical: scd4x: Convert to i2c's .probe_new()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 18 Nov 2022 22:36:52 +0000 (23:36 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 20:01:40 +0000 (20:01 +0000)
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-79-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/chemical/scd4x.c

index 54066532ea4589139a0e384ffec59a43a3db691b..f7ed9455b3c8fada9e5de7c2f35738092e581988 100644 (file)
@@ -615,7 +615,7 @@ out:
        return IRQ_HANDLED;
 }
 
-static int scd4x_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static int scd4x_probe(struct i2c_client *client)
 {
        static const unsigned long scd4x_scan_masks[] = { 0x07, 0x00 };
        struct device *dev = &client->dev;
@@ -690,7 +690,7 @@ static struct i2c_driver scd4x_i2c_driver = {
                .of_match_table = scd4x_dt_ids,
                .pm = pm_sleep_ptr(&scd4x_pm_ops),
        },
-       .probe = scd4x_probe,
+       .probe_new = scd4x_probe,
 };
 module_i2c_driver(scd4x_i2c_driver);