From: Dave Stevenson Date: Fri, 2 Jun 2017 12:18:13 +0000 (-0300) Subject: [media] tc358743: Setup default mbus_fmt before registering X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2da2391c0f200b07bdc4b8984d69112337dc6dc7;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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: Dave Stevenson Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index 6ba65c783161..7d20cac9711c 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -1910,6 +1910,8 @@ static int tc358743_probe(struct i2c_client *client, if (err < 0) goto err_hdl; + state->mbus_fmt_code = MEDIA_BUS_FMT_RGB888_1X24; + sd->dev = &client->dev; err = v4l2_async_register_subdev(sd); if (err < 0) @@ -1924,7 +1926,6 @@ static int tc358743_probe(struct i2c_client *client, tc358743_s_dv_timings(sd, &default_timing); - state->mbus_fmt_code = MEDIA_BUS_FMT_RGB888_1X24; tc358743_set_csi_color_space(sd); tc358743_init_interrupts(sd);