Commit 06d10073 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Jonathan Cameron

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-135-uwe@kleine-koenig.orgSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent c49135d9
...@@ -735,8 +735,7 @@ static irqreturn_t opt3001_irq(int irq, void *_iio) ...@@ -735,8 +735,7 @@ static irqreturn_t opt3001_irq(int irq, void *_iio)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static int opt3001_probe(struct i2c_client *client, static int opt3001_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
struct device *dev = &client->dev; struct device *dev = &client->dev;
...@@ -835,7 +834,7 @@ static const struct of_device_id opt3001_of_match[] = { ...@@ -835,7 +834,7 @@ static const struct of_device_id opt3001_of_match[] = {
MODULE_DEVICE_TABLE(of, opt3001_of_match); MODULE_DEVICE_TABLE(of, opt3001_of_match);
static struct i2c_driver opt3001_driver = { static struct i2c_driver opt3001_driver = {
.probe = opt3001_probe, .probe_new = opt3001_probe,
.remove = opt3001_remove, .remove = opt3001_remove,
.id_table = opt3001_id, .id_table = opt3001_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment