Skip to content

Commit af44ad5

Browse files
Wenbing WangMauro Carvalho Chehab
authored andcommitted
[media] soc_camera: error dev remove and v4l2 call
in soc_camera_close(), if ici->ops->remove() removes device firstly, and then call __soc_camera_power_off(), it has logic error. Since if remove device, it should disable subdev clk. but in __soc_camera_ power_off(), it will callback v4l2 s_power function which will read/write subdev registers to control power by i2c. and then i2c read/write will fail because of clk disable. So suggest to re-sequence two functions call. Change-Id: Iee7a6d4fc7c7c1addb5d342621eb8dcd00fa2745 Signed-off-by: Wenbing Wang <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 697a6d2 commit af44ad5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/media/platform/soc_camera/soc_camera.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,9 +643,9 @@ static int soc_camera_close(struct file *file)
643643

644644
if (ici->ops->init_videobuf2)
645645
vb2_queue_release(&icd->vb2_vidq);
646-
ici->ops->remove(icd);
647-
648646
__soc_camera_power_off(icd);
647+
648+
ici->ops->remove(icd);
649649
}
650650

651651
if (icd->streamer == file)

0 commit comments

Comments
 (0)