Previously, the sensor was not streaming after resume from suspend,
i.e. on S0->S3->S0 transition. Due to this, camera app preview appeared
as stuck.
Now, handle streaming state correctly in case of suspend-resume.
Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
                return ret;
        }
 
-       ov5670->streaming = true;
-
        return 0;
 }
 
        if (ret)
                dev_err(&client->dev, "%s failed to set stream\n", __func__);
 
-       ov5670->streaming = false;
-
        /* Return success even if it was an error, as there is nothing the
         * caller can do about it.
         */
                ret = ov5670_stop_streaming(ov5670);
                pm_runtime_put(&client->dev);
        }
+       ov5670->streaming = enable;
        goto unlock_and_return;
 
 error: