diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2011-11-09 06:26:42 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-11-24 16:18:19 -0500 |
commit | a6ff0a06d8634a07db52dbc006fd9ce4c438c1e3 (patch) | |
tree | 1e6e6303c25fc21f478a5d8dbd7d228719e123cc /drivers/staging | |
parent | 0b217d2125acc039d2f3a94f01821472fbbb75b6 (diff) |
[media] easycap: fix warnings: variable set but not used
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/easycap/easycap_low.c | 10 | ||||
-rw-r--r-- | drivers/staging/media/easycap/easycap_main.c | 7 | ||||
-rw-r--r-- | drivers/staging/media/easycap/easycap_sound.c | 3 |
3 files changed, 9 insertions, 11 deletions
diff --git a/drivers/staging/media/easycap/easycap_low.c b/drivers/staging/media/easycap/easycap_low.c index 59fdb8ffa28..0380babed22 100644 --- a/drivers/staging/media/easycap/easycap_low.c +++ b/drivers/staging/media/easycap/easycap_low.c | |||
@@ -468,13 +468,17 @@ int setup_stk(struct usb_device *p, bool ntsc) | |||
468 | /****************************************************************************/ | 468 | /****************************************************************************/ |
469 | int setup_saa(struct usb_device *p, bool ntsc) | 469 | int setup_saa(struct usb_device *p, bool ntsc) |
470 | { | 470 | { |
471 | int i, ir; | 471 | int i, rc; |
472 | const struct saa7113config *cfg; | 472 | const struct saa7113config *cfg; |
473 | if (!p) | 473 | if (!p) |
474 | return -ENODEV; | 474 | return -ENODEV; |
475 | cfg = (ntsc) ? saa7113configNTSC : saa7113configPAL; | 475 | cfg = (ntsc) ? saa7113configNTSC : saa7113configPAL; |
476 | for (i = 0; cfg[i].reg != 0xFF; i++) | 476 | for (i = 0; cfg[i].reg != 0xFF; i++) { |
477 | ir = write_saa(p, cfg[i].reg, cfg[i].set); | 477 | rc = write_saa(p, cfg[i].reg, cfg[i].set); |
478 | if (rc) | ||
479 | dev_err(&p->dev, | ||
480 | "Failed to set SAA register %d", cfg[i].reg); | ||
481 | } | ||
478 | return 0; | 482 | return 0; |
479 | } | 483 | } |
480 | /****************************************************************************/ | 484 | /****************************************************************************/ |
diff --git a/drivers/staging/media/easycap/easycap_main.c b/drivers/staging/media/easycap/easycap_main.c index 525a6b6974d..8ff5f38ea19 100644 --- a/drivers/staging/media/easycap/easycap_main.c +++ b/drivers/staging/media/easycap/easycap_main.c | |||
@@ -1199,8 +1199,6 @@ int easycap_video_dqbuf(struct easycap *peasycap, int mode) | |||
1199 | * WHEN BOOLEAN PARAMETER decimatepixel IS true, ONLY THE FIELD FOR WHICH | 1199 | * WHEN BOOLEAN PARAMETER decimatepixel IS true, ONLY THE FIELD FOR WHICH |
1200 | * odd==false IS TRANSFERRED TO THE FRAME BUFFER. | 1200 | * odd==false IS TRANSFERRED TO THE FRAME BUFFER. |
1201 | * | 1201 | * |
1202 | * THE BOOLEAN PARAMETER offerfields IS true ONLY WHEN THE USER PROGRAM | ||
1203 | * CHOOSES THE OPTION V4L2_FIELD_INTERLACED. | ||
1204 | */ | 1202 | */ |
1205 | /*---------------------------------------------------------------------------*/ | 1203 | /*---------------------------------------------------------------------------*/ |
1206 | static int field2frame(struct easycap *peasycap) | 1204 | static int field2frame(struct easycap *peasycap) |
@@ -1212,7 +1210,7 @@ static int field2frame(struct easycap *peasycap) | |||
1212 | int rc, bytesperpixel, multiplier; | 1210 | int rc, bytesperpixel, multiplier; |
1213 | int much, more, over, rump, caches, input; | 1211 | int much, more, over, rump, caches, input; |
1214 | u8 mask, margin; | 1212 | u8 mask, margin; |
1215 | bool odd, isuy, decimatepixel, offerfields, badinput; | 1213 | bool odd, isuy, decimatepixel, badinput; |
1216 | 1214 | ||
1217 | if (!peasycap) { | 1215 | if (!peasycap) { |
1218 | SAY("ERROR: peasycap is NULL\n"); | 1216 | SAY("ERROR: peasycap is NULL\n"); |
@@ -1228,8 +1226,6 @@ static int field2frame(struct easycap *peasycap) | |||
1228 | peasycap->field_buffer[peasycap->field_read][0].input, | 1226 | peasycap->field_buffer[peasycap->field_read][0].input, |
1229 | peasycap->field_read, peasycap->frame_fill); | 1227 | peasycap->field_read, peasycap->frame_fill); |
1230 | JOM(8, "===== %i=bytesperpixel\n", peasycap->bytesperpixel); | 1228 | JOM(8, "===== %i=bytesperpixel\n", peasycap->bytesperpixel); |
1231 | if (peasycap->offerfields) | ||
1232 | JOM(8, "===== offerfields\n"); | ||
1233 | 1229 | ||
1234 | /*---------------------------------------------------------------------------*/ | 1230 | /*---------------------------------------------------------------------------*/ |
1235 | /* | 1231 | /* |
@@ -1251,7 +1247,6 @@ static int field2frame(struct easycap *peasycap) | |||
1251 | #endif /*EASYCAP_TESTCARD*/ | 1247 | #endif /*EASYCAP_TESTCARD*/ |
1252 | /*---------------------------------------------------------------------------*/ | 1248 | /*---------------------------------------------------------------------------*/ |
1253 | 1249 | ||
1254 | offerfields = peasycap->offerfields; | ||
1255 | bytesperpixel = peasycap->bytesperpixel; | 1250 | bytesperpixel = peasycap->bytesperpixel; |
1256 | decimatepixel = peasycap->decimatepixel; | 1251 | decimatepixel = peasycap->decimatepixel; |
1257 | 1252 | ||
diff --git a/drivers/staging/media/easycap/easycap_sound.c b/drivers/staging/media/easycap/easycap_sound.c index 353b6b7b74e..8c8bcae8ded 100644 --- a/drivers/staging/media/easycap/easycap_sound.c +++ b/drivers/staging/media/easycap/easycap_sound.c | |||
@@ -592,7 +592,6 @@ static int easycap_alsa_ack(struct snd_pcm_substream *pss) | |||
592 | static int easycap_alsa_trigger(struct snd_pcm_substream *pss, int cmd) | 592 | static int easycap_alsa_trigger(struct snd_pcm_substream *pss, int cmd) |
593 | { | 593 | { |
594 | struct easycap *peasycap; | 594 | struct easycap *peasycap; |
595 | int retval; | ||
596 | 595 | ||
597 | JOT(4, "%i=cmd cf %i=START %i=STOP\n", cmd, SNDRV_PCM_TRIGGER_START, | 596 | JOT(4, "%i=cmd cf %i=START %i=STOP\n", cmd, SNDRV_PCM_TRIGGER_START, |
598 | SNDRV_PCM_TRIGGER_STOP); | 597 | SNDRV_PCM_TRIGGER_STOP); |
@@ -615,7 +614,7 @@ static int easycap_alsa_trigger(struct snd_pcm_substream *pss, int cmd) | |||
615 | break; | 614 | break; |
616 | } | 615 | } |
617 | default: | 616 | default: |
618 | retval = -EINVAL; | 617 | return -EINVAL; |
619 | } | 618 | } |
620 | return 0; | 619 | return 0; |
621 | } | 620 | } |