summaryrefslogtreecommitdiffstats
path: root/drivers/iio/light/opt3001.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-11-18 23:37:48 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-11-23 20:20:28 +0000
commit06d10073283e5b301bd850a9ded6f592fb74a803 (patch)
tree6e38d7856fd0413526a34cb84d94c837961535e4 /drivers/iio/light/opt3001.c
parentc49135d99f5285a3e781a50ee7111f68150d5cd2 (diff)
downloadlinux-stable-06d10073283e5b301bd850a9ded6f592fb74a803.tar.gz
linux-stable-06d10073283e5b301bd850a9ded6f592fb74a803.tar.bz2
linux-stable-06d10073283e5b301bd850a9ded6f592fb74a803.zip
iio: light: opt3001: Convert to i2c's .probe_new()
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>
Diffstat (limited to 'drivers/iio/light/opt3001.c')
-rw-r--r--drivers/iio/light/opt3001.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c
index a26d1c3f9543..ec4f5c2369c4 100644
--- a/drivers/iio/light/opt3001.c
+++ b/drivers/iio/light/opt3001.c
@@ -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,