media: i2c: adv748x: Convert to new i2c device probe()
The I2C core framework provides a simplified probe framework from commit
b8a1a4cd5a ("i2c: Provide a temporary .probe_new() call-back type").
Convert the ADV748x to utilise this simplified i2c driver registration.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
2dbfc65250
commit
9deff920bd
@@ -668,8 +668,7 @@ static void adv748x_dt_cleanup(struct adv748x_state *state)
|
|||||||
of_node_put(state->endpoints[i]);
|
of_node_put(state->endpoints[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int adv748x_probe(struct i2c_client *client,
|
static int adv748x_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
struct adv748x_state *state;
|
struct adv748x_state *state;
|
||||||
int ret;
|
int ret;
|
||||||
@@ -797,13 +796,6 @@ static int adv748x_remove(struct i2c_client *client)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct i2c_device_id adv748x_id[] = {
|
|
||||||
{ "adv7481", 0 },
|
|
||||||
{ "adv7482", 0 },
|
|
||||||
{ },
|
|
||||||
};
|
|
||||||
MODULE_DEVICE_TABLE(i2c, adv748x_id);
|
|
||||||
|
|
||||||
static const struct of_device_id adv748x_of_table[] = {
|
static const struct of_device_id adv748x_of_table[] = {
|
||||||
{ .compatible = "adi,adv7481", },
|
{ .compatible = "adi,adv7481", },
|
||||||
{ .compatible = "adi,adv7482", },
|
{ .compatible = "adi,adv7482", },
|
||||||
@@ -816,9 +808,8 @@ static struct i2c_driver adv748x_driver = {
|
|||||||
.name = "adv748x",
|
.name = "adv748x",
|
||||||
.of_match_table = adv748x_of_table,
|
.of_match_table = adv748x_of_table,
|
||||||
},
|
},
|
||||||
.probe = adv748x_probe,
|
.probe_new = adv748x_probe,
|
||||||
.remove = adv748x_remove,
|
.remove = adv748x_remove,
|
||||||
.id_table = adv748x_id,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module_i2c_driver(adv748x_driver);
|
module_i2c_driver(adv748x_driver);
|
||||||
|
|||||||
Reference in New Issue
Block a user