Skip to content

Commit

Permalink
media: i2c: et8ek8: Convert to new i2c device probe()
Browse files Browse the repository at this point in the history
The I2C core framework provides a simplified probe framework from commit
b8a1a4c ("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: Kieran Bingham <[email protected]>
Reviewed-by: Wolfram Sang <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
kbingham authored and mchehab committed Aug 13, 2019
1 parent 42b6612 commit bec5352
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/media/i2c/et8ek8/et8ek8_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1396,8 +1396,7 @@ static int __maybe_unused et8ek8_resume(struct device *dev)
return __et8ek8_set_power(sensor, true);
}

static int et8ek8_probe(struct i2c_client *client,
const struct i2c_device_id *devid)
static int et8ek8_probe(struct i2c_client *client)
{
struct et8ek8_sensor *sensor;
struct device *dev = &client->dev;
Expand Down Expand Up @@ -1504,7 +1503,7 @@ static struct i2c_driver et8ek8_i2c_driver = {
.pm = &et8ek8_pm_ops,
.of_match_table = et8ek8_of_table,
},
.probe = et8ek8_probe,
.probe_new = et8ek8_probe,
.remove = __exit_p(et8ek8_remove),
.id_table = et8ek8_id_table,
};
Expand Down

0 comments on commit bec5352

Please sign in to comment.