Commit bec5352d authored by Kieran Bingham's avatar Kieran Bingham Committed by Mauro Carvalho Chehab

media: i2c: et8ek8: Convert to new i2c device probe()

The I2C core framework provides a simplified probe framework from commit
b8a1a4cd ("i2c: Provide a temporary .probe_new() call-back type").

This driver does not utilise the i2c_device_id table in the probe, so we can
easily convert it to utilise the simplified i2c driver registration.
Signed-off-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 42b66122
...@@ -1396,8 +1396,7 @@ static int __maybe_unused et8ek8_resume(struct device *dev) ...@@ -1396,8 +1396,7 @@ static int __maybe_unused et8ek8_resume(struct device *dev)
return __et8ek8_set_power(sensor, true); return __et8ek8_set_power(sensor, true);
} }
static int et8ek8_probe(struct i2c_client *client, static int et8ek8_probe(struct i2c_client *client)
const struct i2c_device_id *devid)
{ {
struct et8ek8_sensor *sensor; struct et8ek8_sensor *sensor;
struct device *dev = &client->dev; struct device *dev = &client->dev;
...@@ -1504,7 +1503,7 @@ static struct i2c_driver et8ek8_i2c_driver = { ...@@ -1504,7 +1503,7 @@ static struct i2c_driver et8ek8_i2c_driver = {
.pm = &et8ek8_pm_ops, .pm = &et8ek8_pm_ops,
.of_match_table = et8ek8_of_table, .of_match_table = et8ek8_of_table,
}, },
.probe = et8ek8_probe, .probe_new = et8ek8_probe,
.remove = __exit_p(et8ek8_remove), .remove = __exit_p(et8ek8_remove),
.id_table = et8ek8_id_table, .id_table = et8ek8_id_table,
}; };
......
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