From: Vladimir Barinov Date: Thu, 11 Apr 2013 21:06:46 +0000 (-0300) Subject: [media] adv7180: fix querystd() method for no input signal X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b294a1921454fbcc6e983750ae977ce8a28f31bc;p=openwrt%2Fstaging%2Fblogic.git [media] adv7180: fix querystd() method for no input signal When the input signal is not detected querystd() method should return V4L2_STD_UNKNOWN instead of previously latched analog video standard. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index 34f39d3b3e3e..afd561ab190d 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -135,6 +135,10 @@ struct adv7180_state { static v4l2_std_id adv7180_std_to_v4l2(u8 status1) { + /* in case V4L2_IN_ST_NO_SIGNAL */ + if (!(status1 & ADV7180_STATUS1_IN_LOCK)) + return V4L2_STD_UNKNOWN; + switch (status1 & ADV7180_STATUS1_AUTOD_MASK) { case ADV7180_STATUS1_AUTOD_NTSM_M_J: return V4L2_STD_NTSC;