Commit 9524da83 authored by Wolfram Sang's avatar Wolfram Sang Committed by Mauro Carvalho Chehab

media: i2c: adv7511-v4l2: convert to i2c_new_dummy_device

Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an
ERRPTR which we use in error handling.
Signed-off-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 31b9754c
...@@ -1872,11 +1872,11 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id * ...@@ -1872,11 +1872,11 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id *
goto err_entity; goto err_entity;
} }
state->i2c_edid = i2c_new_dummy(client->adapter, state->i2c_edid = i2c_new_dummy_device(client->adapter,
state->i2c_edid_addr >> 1); state->i2c_edid_addr >> 1);
if (state->i2c_edid == NULL) { if (IS_ERR(state->i2c_edid)) {
v4l2_err(sd, "failed to register edid i2c client\n"); v4l2_err(sd, "failed to register edid i2c client\n");
err = -ENOMEM; err = PTR_ERR(state->i2c_edid);
goto err_entity; goto err_entity;
} }
...@@ -1889,11 +1889,11 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id * ...@@ -1889,11 +1889,11 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id *
} }
if (state->pdata.cec_clk) { if (state->pdata.cec_clk) {
state->i2c_cec = i2c_new_dummy(client->adapter, state->i2c_cec = i2c_new_dummy_device(client->adapter,
state->i2c_cec_addr >> 1); state->i2c_cec_addr >> 1);
if (state->i2c_cec == NULL) { if (IS_ERR(state->i2c_cec)) {
v4l2_err(sd, "failed to register cec i2c client\n"); v4l2_err(sd, "failed to register cec i2c client\n");
err = -ENOMEM; err = PTR_ERR(state->i2c_cec);
goto err_unreg_edid; goto err_unreg_edid;
} }
adv7511_wr(sd, 0xe2, 0x00); /* power up cec section */ adv7511_wr(sd, 0xe2, 0x00); /* power up cec section */
...@@ -1901,10 +1901,10 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id * ...@@ -1901,10 +1901,10 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id *
adv7511_wr(sd, 0xe2, 0x01); /* power down cec section */ adv7511_wr(sd, 0xe2, 0x01); /* power down cec section */
} }
state->i2c_pktmem = i2c_new_dummy(client->adapter, state->i2c_pktmem_addr >> 1); state->i2c_pktmem = i2c_new_dummy_device(client->adapter, state->i2c_pktmem_addr >> 1);
if (state->i2c_pktmem == NULL) { if (IS_ERR(state->i2c_pktmem)) {
v4l2_err(sd, "failed to register pktmem i2c client\n"); v4l2_err(sd, "failed to register pktmem i2c client\n");
err = -ENOMEM; err = PTR_ERR(state->i2c_pktmem);
goto err_unreg_cec; goto err_unreg_cec;
} }
......
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