[media] staging: easycap: Initialize 'ntsc' parameter before usage

This parameter is now initialized at init_easycap(),
this way we assure it won't be used uninitialized.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Ezequiel García 2012-02-24 11:24:17 -03:00 committed by Mauro Carvalho Chehab
parent f9482d0198
commit 751869e6ef
1 changed files with 4 additions and 4 deletions

View File

@ -2960,6 +2960,10 @@ static void init_easycap(struct easycap *peasycap,
peasycap->audio_isoc_buffer_size = -1; peasycap->audio_isoc_buffer_size = -1;
peasycap->frame_buffer_many = FRAME_BUFFER_MANY; peasycap->frame_buffer_many = FRAME_BUFFER_MANY;
peasycap->ntsc = easycap_ntsc;
JOM(8, "defaulting initially to %s\n",
easycap_ntsc ? "NTSC" : "PAL");
} }
static int populate_inputset(struct easycap *peasycap) static int populate_inputset(struct easycap *peasycap)
@ -2972,7 +2976,6 @@ static int populate_inputset(struct easycap *peasycap)
inputset = peasycap->inputset; inputset = peasycap->inputset;
/* FIXME: peasycap->ntsc is not yet initialized */
fmtidx = peasycap->ntsc ? NTSC_M : PAL_BGHIN; fmtidx = peasycap->ntsc ? NTSC_M : PAL_BGHIN;
m = 0; m = 0;
@ -3650,9 +3653,6 @@ static int easycap_usb_probe(struct usb_interface *intf,
* because some udev rules triggers easycap_open() * because some udev rules triggers easycap_open()
* immediately after registration, causing a clash. * immediately after registration, causing a clash.
*/ */
peasycap->ntsc = easycap_ntsc;
JOM(8, "defaulting initially to %s\n",
easycap_ntsc ? "NTSC" : "PAL");
rc = reset(peasycap); rc = reset(peasycap);
if (rc) { if (rc) {
SAM("ERROR: reset() rc = %i\n", rc); SAM("ERROR: reset() rc = %i\n", rc);