Commit 2da2391c authored by Dave Stevenson's avatar Dave Stevenson Committed by Mauro Carvalho Chehab

[media] tc358743: Setup default mbus_fmt before registering

Previously the mbus_fmt_code was set after the device was
registered. If a connected sub-device called tc358743_get_fmt
prior to that point it would get an invalid code back.
Signed-off-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 3cb0fe6f
...@@ -1910,6 +1910,8 @@ static int tc358743_probe(struct i2c_client *client, ...@@ -1910,6 +1910,8 @@ static int tc358743_probe(struct i2c_client *client,
if (err < 0) if (err < 0)
goto err_hdl; goto err_hdl;
state->mbus_fmt_code = MEDIA_BUS_FMT_RGB888_1X24;
sd->dev = &client->dev; sd->dev = &client->dev;
err = v4l2_async_register_subdev(sd); err = v4l2_async_register_subdev(sd);
if (err < 0) if (err < 0)
...@@ -1924,7 +1926,6 @@ static int tc358743_probe(struct i2c_client *client, ...@@ -1924,7 +1926,6 @@ static int tc358743_probe(struct i2c_client *client,
tc358743_s_dv_timings(sd, &default_timing); tc358743_s_dv_timings(sd, &default_timing);
state->mbus_fmt_code = MEDIA_BUS_FMT_RGB888_1X24;
tc358743_set_csi_color_space(sd); tc358743_set_csi_color_space(sd);
tc358743_init_interrupts(sd); tc358743_init_interrupts(sd);
......
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