From fdd20a18ed91a5c1e62884237eb40f1008a7f91f Mon Sep 17 00:00:00 2001 From: Mike Isely Date: Fri, 2 Dec 2005 14:03:10 +0000 Subject: Clear v4l2_frequency structure before using it -Need to clear v4l2_frequency structure to zero before using it, in order that newly added fields (that we otherwise would not care about) will take proper default values. From: Mike Isely Signed-off-by: Mike Isely --- v4l/ChangeLog | 11 +++++++++++ v4l_experimental/pvrusb2/pvrusb2-tuner.c | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/v4l/ChangeLog b/v4l/ChangeLog index 9071b3c7b..4f0e1bbb0 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,14 @@ +2005-12-02 14:00 mcisely + + * ../v4l_experimental/pvrusb2/pvrusb2-tuner.c: + (pvr2_tuner_set_freq): + + -Need to clear v4l2_frequency structure to zero before using it, + in order that newly added fields (that we otherwise would not + care about) will take proper default values. + + Signed-off-by: Mike Isely + 2005-12-02 13:56 mcisely * ../v4l_experimental/pvrusb2/pvrusb2-hdw.c: diff --git a/v4l_experimental/pvrusb2/pvrusb2-tuner.c b/v4l_experimental/pvrusb2/pvrusb2-tuner.c index fcde1436a..ff94c1da2 100644 --- a/v4l_experimental/pvrusb2/pvrusb2-tuner.c +++ b/v4l_experimental/pvrusb2/pvrusb2-tuner.c @@ -1,6 +1,6 @@ /* * - * $Id: pvrusb2-tuner.c,v 1.4 2005/12/02 13:59:00 mcisely Exp $ + * $Id: pvrusb2-tuner.c,v 1.5 2005/12/02 14:03:10 mcisely Exp $ * * Copyright (C) 2005 Mike Isely * Copyright (C) 2004 Aurelien Alleaume @@ -64,6 +64,7 @@ int pvr2_tuner_set_freq(struct pvr2_hdw *hdw) { int stat; struct v4l2_frequency freq; + memset(&freq,0,sizeof(freq)); freq.frequency = hdw->controls[PVR2_CID_FREQUENCY].value / 62500; freq.tuner = 0; freq.type = V4L2_TUNER_ANALOG_TV; -- cgit v1.2.3