iio: light: opt3001: Convert to i2c's .probe_new()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 18 Nov 2022 22:37:48 +0000 (23:37 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 20:20:28 +0000 (20:20 +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-135-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/opt3001.c

index a26d1c3..ec4f5c2 100644 (file)
@@ -735,8 +735,7 @@ out:
        return IRQ_HANDLED;
 }
 
-static int opt3001_probe(struct i2c_client *client,
-               const struct i2c_device_id *id)
+static int opt3001_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
 
@@ -835,7 +834,7 @@ static const struct of_device_id opt3001_of_match[] = {
 MODULE_DEVICE_TABLE(of, opt3001_of_match);
 
 static struct i2c_driver opt3001_driver = {
-       .probe = opt3001_probe,
+       .probe_new = opt3001_probe,
        .remove = opt3001_remove,
        .id_table = opt3001_id,