summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorWenbing Wang <wangwb@marvell.com>2013-06-05 13:37:14 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-09 04:51:06 +0400
commitaf44ad5edd1eb6ca92ed5be48e0004e1f04bf219 (patch)
treeb6072a0041086ec710243ebec0a2e488b2a88ad0 /drivers/media
parent697a6d2387692c7f9c94f3bfb3dac474aa840f02 (diff)
downloadlinux-af44ad5edd1eb6ca92ed5be48e0004e1f04bf219.tar.xz
[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 <wangwb@marvell.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/soc_camera/soc_camera.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index eea832c5fd01..3a4efbdc7668 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -643,9 +643,9 @@ static int soc_camera_close(struct file *file)
if (ici->ops->init_videobuf2)
vb2_queue_release(&icd->vb2_vidq);
- ici->ops->remove(icd);
-
__soc_camera_power_off(icd);
+
+ ici->ops->remove(icd);
}
if (icd->streamer == file)