Commit a6ff0a06 authored by Tomas Winkler's avatar Tomas Winkler Committed by Mauro Carvalho Chehab

[media] easycap: fix warnings: variable set but not used

Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 0b217d21
...@@ -468,13 +468,17 @@ int setup_stk(struct usb_device *p, bool ntsc) ...@@ -468,13 +468,17 @@ int setup_stk(struct usb_device *p, bool ntsc)
/****************************************************************************/ /****************************************************************************/
int setup_saa(struct usb_device *p, bool ntsc) int setup_saa(struct usb_device *p, bool ntsc)
{ {
int i, ir; int i, rc;
const struct saa7113config *cfg; const struct saa7113config *cfg;
if (!p) if (!p)
return -ENODEV; return -ENODEV;
cfg = (ntsc) ? saa7113configNTSC : saa7113configPAL; cfg = (ntsc) ? saa7113configNTSC : saa7113configPAL;
for (i = 0; cfg[i].reg != 0xFF; i++) for (i = 0; cfg[i].reg != 0xFF; i++) {
ir = write_saa(p, cfg[i].reg, cfg[i].set); rc = write_saa(p, cfg[i].reg, cfg[i].set);
if (rc)
dev_err(&p->dev,
"Failed to set SAA register %d", cfg[i].reg);
}
return 0; return 0;
} }
/****************************************************************************/ /****************************************************************************/
......
...@@ -1199,8 +1199,6 @@ int easycap_video_dqbuf(struct easycap *peasycap, int mode) ...@@ -1199,8 +1199,6 @@ int easycap_video_dqbuf(struct easycap *peasycap, int mode)
* WHEN BOOLEAN PARAMETER decimatepixel IS true, ONLY THE FIELD FOR WHICH * WHEN BOOLEAN PARAMETER decimatepixel IS true, ONLY THE FIELD FOR WHICH
* odd==false IS TRANSFERRED TO THE FRAME BUFFER. * odd==false IS TRANSFERRED TO THE FRAME BUFFER.
* *
* THE BOOLEAN PARAMETER offerfields IS true ONLY WHEN THE USER PROGRAM
* CHOOSES THE OPTION V4L2_FIELD_INTERLACED.
*/ */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int field2frame(struct easycap *peasycap) static int field2frame(struct easycap *peasycap)
...@@ -1212,7 +1210,7 @@ static int field2frame(struct easycap *peasycap) ...@@ -1212,7 +1210,7 @@ static int field2frame(struct easycap *peasycap)
int rc, bytesperpixel, multiplier; int rc, bytesperpixel, multiplier;
int much, more, over, rump, caches, input; int much, more, over, rump, caches, input;
u8 mask, margin; u8 mask, margin;
bool odd, isuy, decimatepixel, offerfields, badinput; bool odd, isuy, decimatepixel, badinput;
if (!peasycap) { if (!peasycap) {
SAY("ERROR: peasycap is NULL\n"); SAY("ERROR: peasycap is NULL\n");
...@@ -1228,8 +1226,6 @@ static int field2frame(struct easycap *peasycap) ...@@ -1228,8 +1226,6 @@ static int field2frame(struct easycap *peasycap)
peasycap->field_buffer[peasycap->field_read][0].input, peasycap->field_buffer[peasycap->field_read][0].input,
peasycap->field_read, peasycap->frame_fill); peasycap->field_read, peasycap->frame_fill);
JOM(8, "===== %i=bytesperpixel\n", peasycap->bytesperpixel); JOM(8, "===== %i=bytesperpixel\n", peasycap->bytesperpixel);
if (peasycap->offerfields)
JOM(8, "===== offerfields\n");
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* /*
...@@ -1251,7 +1247,6 @@ static int field2frame(struct easycap *peasycap) ...@@ -1251,7 +1247,6 @@ static int field2frame(struct easycap *peasycap)
#endif /*EASYCAP_TESTCARD*/ #endif /*EASYCAP_TESTCARD*/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
offerfields = peasycap->offerfields;
bytesperpixel = peasycap->bytesperpixel; bytesperpixel = peasycap->bytesperpixel;
decimatepixel = peasycap->decimatepixel; decimatepixel = peasycap->decimatepixel;
......
...@@ -592,7 +592,6 @@ static int easycap_alsa_ack(struct snd_pcm_substream *pss) ...@@ -592,7 +592,6 @@ static int easycap_alsa_ack(struct snd_pcm_substream *pss)
static int easycap_alsa_trigger(struct snd_pcm_substream *pss, int cmd) static int easycap_alsa_trigger(struct snd_pcm_substream *pss, int cmd)
{ {
struct easycap *peasycap; struct easycap *peasycap;
int retval;
JOT(4, "%i=cmd cf %i=START %i=STOP\n", cmd, SNDRV_PCM_TRIGGER_START, JOT(4, "%i=cmd cf %i=START %i=STOP\n", cmd, SNDRV_PCM_TRIGGER_START,
SNDRV_PCM_TRIGGER_STOP); SNDRV_PCM_TRIGGER_STOP);
...@@ -615,7 +614,7 @@ static int easycap_alsa_trigger(struct snd_pcm_substream *pss, int cmd) ...@@ -615,7 +614,7 @@ static int easycap_alsa_trigger(struct snd_pcm_substream *pss, int cmd)
break; break;
} }
default: default:
retval = -EINVAL; return -EINVAL;
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment