media: ov5640: fix restore of last mode set
authorHugues Fruchet <hugues.fruchet@st.com>
Tue, 11 Sep 2018 13:48:21 +0000 (09:48 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 17 Sep 2018 19:33:38 +0000 (15:33 -0400)
commit985cdcb08a0488558d1005139596b64d73bee267
treee732fdce97f3be11e6c641d71e459cb2619b984e
parenta8f438c684eaa4cbe6c98828eb996d5ec53e24fb
media: ov5640: fix restore of last mode set

Mode setting depends on last mode set, in particular
because of exposure calculation when downscale mode
change between subsampling and scaling.
At stream on the last mode was wrongly set to current mode,
so no change was detected and exposure calculation
was not made, fix this.

Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Tested-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/ov5640.c