Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: i2c: st_mipid02: cascade s_stream call to the source subdev

Cascade the s_stream call to the source subdev whenever the bridge
streaming is enable / disabled.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Alain Volmat and committed by
Mauro Carvalho Chehab
7d0e95eb 1073f441

+12 -1
+12 -1
drivers/media/i2c/st-mipid02.c
··· 545 545 static int mipid02_stream_disable(struct mipid02_dev *bridge) 546 546 { 547 547 struct i2c_client *client = bridge->i2c_client; 548 - int ret; 548 + int ret = -EINVAL; 549 + 550 + if (!bridge->s_subdev) 551 + goto error; 552 + 553 + ret = v4l2_subdev_call(bridge->s_subdev, video, s_stream, 0); 554 + if (ret) 555 + goto error; 549 556 550 557 /* Disable all lanes */ 551 558 ret = mipid02_write_reg(bridge, MIPID02_CLK_LANE_REG1, 0); ··· 637 630 goto error; 638 631 ret = mipid02_write_reg(bridge, MIPID02_PIX_WIDTH_CTRL_EMB, 639 632 bridge->r.pix_width_ctrl_emb); 633 + if (ret) 634 + goto error; 635 + 636 + ret = v4l2_subdev_call(bridge->s_subdev, video, s_stream, 1); 640 637 if (ret) 641 638 goto error; 642 639