atomisp2: set initial streaming state to disabled
authorflyan <flyanb@isoftstone.com>
Wed, 20 Nov 2013 07:57:32 +0000 (15:57 +0800)
committerYin Kangkai <kangkai.yin@linux.intel.com>
Thu, 26 Dec 2013 14:34:00 +0000 (22:34 +0800)
If user space application fails to explicitly disable streaming before
closing the device, the streaming state will be left with an incorrect
value. This will possible make it impossible to reopen the device.
This fixes an issue where after camera application has crashed, the
camera device can not be opened any more.

Signed-off-by: Yan Feilong <feilongx.yan@intel.com>
drivers/media/video/atomisp2/atomisp_fops.c

index 4f22927..60e6b6d 100644 (file)
@@ -376,6 +376,7 @@ int atomisp_init_struct(struct atomisp_device *isp)
        isp->need_gfx_throttle = true;
        isp->isp_fatal_error = false;
        isp->delayed_init = ATOMISP_DELAYED_INIT_NOT_QUEUED;
+       isp->streaming = ATOMISP_DEVICE_STREAMING_DISABLED;
 
        /*
         * For Merrifield, frequency is scalable.
@@ -909,4 +910,3 @@ const struct v4l2_file_operations atomisp_file_fops = {
        .ioctl = video_ioctl2,
        .poll = atomisp_poll,
 };
-