diff options
author | Ezequiel GarcĂa <elezegarcia@gmail.com> | 2012-02-24 09:24:17 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-15 07:56:36 -0400 |
commit | 751869e6ef489e33c66a254fa004c92e76ef1a43 (patch) | |
tree | 69d707fb7b0a32e505e3ffa9a87a434fe0ff7993 /drivers | |
parent | f9482d01985b03633e39e1c772bd7d365ab82dc6 (diff) |
[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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/easycap/easycap_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/media/easycap/easycap_main.c b/drivers/staging/media/easycap/easycap_main.c index 9d6dc09656be..480164d8698c 100644 --- a/drivers/staging/media/easycap/easycap_main.c +++ b/drivers/staging/media/easycap/easycap_main.c | |||
@@ -2960,6 +2960,10 @@ static void init_easycap(struct easycap *peasycap, | |||
2960 | peasycap->audio_isoc_buffer_size = -1; | 2960 | peasycap->audio_isoc_buffer_size = -1; |
2961 | 2961 | ||
2962 | peasycap->frame_buffer_many = FRAME_BUFFER_MANY; | 2962 | peasycap->frame_buffer_many = FRAME_BUFFER_MANY; |
2963 | |||
2964 | peasycap->ntsc = easycap_ntsc; | ||
2965 | JOM(8, "defaulting initially to %s\n", | ||
2966 | easycap_ntsc ? "NTSC" : "PAL"); | ||
2963 | } | 2967 | } |
2964 | 2968 | ||
2965 | static int populate_inputset(struct easycap *peasycap) | 2969 | static int populate_inputset(struct easycap *peasycap) |
@@ -2972,7 +2976,6 @@ static int populate_inputset(struct easycap *peasycap) | |||
2972 | 2976 | ||
2973 | inputset = peasycap->inputset; | 2977 | inputset = peasycap->inputset; |
2974 | 2978 | ||
2975 | /* FIXME: peasycap->ntsc is not yet initialized */ | ||
2976 | fmtidx = peasycap->ntsc ? NTSC_M : PAL_BGHIN; | 2979 | fmtidx = peasycap->ntsc ? NTSC_M : PAL_BGHIN; |
2977 | 2980 | ||
2978 | m = 0; | 2981 | m = 0; |
@@ -3650,9 +3653,6 @@ static int easycap_usb_probe(struct usb_interface *intf, | |||
3650 | * because some udev rules triggers easycap_open() | 3653 | * because some udev rules triggers easycap_open() |
3651 | * immediately after registration, causing a clash. | 3654 | * immediately after registration, causing a clash. |
3652 | */ | 3655 | */ |
3653 | peasycap->ntsc = easycap_ntsc; | ||
3654 | JOM(8, "defaulting initially to %s\n", | ||
3655 | easycap_ntsc ? "NTSC" : "PAL"); | ||
3656 | rc = reset(peasycap); | 3656 | rc = reset(peasycap); |
3657 | if (rc) { | 3657 | if (rc) { |
3658 | SAM("ERROR: reset() rc = %i\n", rc); | 3658 | SAM("ERROR: reset() rc = %i\n", rc); |