aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/tvp7002.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/media/video/tvp7002.c b/drivers/media/video/tvp7002.c
index 4a69bcc738f3..f650f0d125eb 100644
--- a/drivers/media/video/tvp7002.c
+++ b/drivers/media/video/tvp7002.c
@@ -785,7 +785,6 @@ static int tvp7002_query_dv_preset(struct v4l2_subdev *sd,
785 struct v4l2_dv_preset *qpreset) 785 struct v4l2_dv_preset *qpreset)
786{ 786{
787 const struct tvp7002_preset_definition *presets = tvp7002_presets; 787 const struct tvp7002_preset_definition *presets = tvp7002_presets;
788 struct v4l2_dv_enum_preset e_preset;
789 struct tvp7002 *device; 788 struct tvp7002 *device;
790 u8 progressive; 789 u8 progressive;
791 u32 lpfr; 790 u32 lpfr;
@@ -828,20 +827,18 @@ static int tvp7002_query_dv_preset(struct v4l2_subdev *sd,
828 } 827 }
829 828
830 if (index == NUM_PRESETS) { 829 if (index == NUM_PRESETS) {
831 v4l2_err(sd, "querystd error, lpf = %x, cpl = %x\n", 830 v4l2_dbg(1, debug, sd, "detection failed: lpf = %x, cpl = %x\n",
832 lpfr, cpln); 831 lpfr, cpln);
833 return -EINVAL; 832 /* Could not detect a signal, so return the 'invalid' preset */
833 qpreset->preset = V4L2_DV_INVALID;
834 return 0;
834 } 835 }
835 836
836 if (v4l_fill_dv_preset_info(presets->preset, &e_preset))
837 return -EINVAL;
838
839 /* Set values in found preset */ 837 /* Set values in found preset */
840 qpreset->preset = presets->preset; 838 qpreset->preset = presets->preset;
841 839
842 /* Update lines per frame and clocks per line info */ 840 /* Update lines per frame and clocks per line info */
843 v4l2_dbg(1, debug, sd, "Current preset: %d %d", 841 v4l2_dbg(1, debug, sd, "detected preset: %d\n", presets->preset);
844 e_preset.width, e_preset.height);
845 return 0; 842 return 0;
846} 843}
847 844