aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLei Wen <leiwen@marvell.com>2011-11-22 09:04:29 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-06 08:00:55 -0500
commit48ecf9fe8fbe7869dcbaeb636a8f9cfa937876aa (patch)
treeb8d6f8dddc98c79d9cf3b50be3ad0e2a7144fc93 /drivers
parentda673e603bb78ea26beaef5720017827aa26dae3 (diff)
[media] soc-camera: change order of removing device
As our general practice, we use stream off before we close the video node. So that the drivers its stream off function would be called before its remove function. But for the case for ctrl+c, the program would be force closed. We have no chance to call that vb2 stream off from user space, but directly call the remove function in soc_camera. In that common code of soc_camera: ici->ops->remove(icd); if (ici->ops->init_videobuf2) vb2_queue_release(&icd->vb2_vidq); It would first call the device remove function, then release vb2, in which stream off function is called. Thus it create different order for the driver. This patch change the order to make driver see the same sequence to make it happy. Signed-off-by: Lei Wen <leiwen@marvell.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/soc_camera.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index a14df27d2552..b82710745ba8 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -600,9 +600,9 @@ static int soc_camera_close(struct file *file)
600 pm_runtime_suspend(&icd->vdev->dev); 600 pm_runtime_suspend(&icd->vdev->dev);
601 pm_runtime_disable(&icd->vdev->dev); 601 pm_runtime_disable(&icd->vdev->dev);
602 602
603 ici->ops->remove(icd);
604 if (ici->ops->init_videobuf2) 603 if (ici->ops->init_videobuf2)
605 vb2_queue_release(&icd->vb2_vidq); 604 vb2_queue_release(&icd->vb2_vidq);
605 ici->ops->remove(icd);
606 606
607 soc_camera_power_off(icd, icl); 607 soc_camera_power_off(icd, icl);
608 } 608 }