aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-05-14 09:17:35 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-14 13:47:03 -0400
commite92ba2830b62ba6315d48083bb7f02d3148d77db (patch)
treef1852abf2cc48bec743b1ecd765bd175142320ef
parent30fdf035874a3b3f5d54f75147bddc2467cb0b7d (diff)
[media] v4l: fix compiler warnings
media_build/v4l/au0828-video.c: In function 'au0828_irq_callback': media_build/v4l/au0828-video.c:123:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable] media_build/v4l/cx23888-ir.c: In function 'pulse_clocks_to_clock_divider': media_build/v4l/cx23888-ir.c:334:6: warning: variable 'rem' set but not used [-Wunused-but-set-variable] media_build/v4l/cx25840-ir.c: In function 'pulse_clocks_to_clock_divider': media_build/v4l/cx25840-ir.c:319:6: warning: variable 'rem' set but not used [-Wunused-but-set-variable] media_build/v4l/cx25840-ir.c: In function 'cx25840_ir_tx_write': media_build/v4l/cx25840-ir.c:863:21: warning: variable 'c' set but not used [-Wunused-but-set-variable] media_build/v4l/em28xx-audio.c: In function 'snd_em28xx_hw_capture_params': media_build/v4l/em28xx-audio.c:346:31: warning: variable 'format' set but not used [-Wunused-but-set-variable] media_build/v4l/em28xx-audio.c:346:25: warning: variable 'rate' set but not used [-Wunused-but-set-variable] media_build/v4l/em28xx-audio.c:346:15: warning: variable 'channels' set but not used [-Wunused-but-set-variable] media_build/v4l/hdpvr-control.c: In function 'get_input_lines_info': media_build/v4l/hdpvr-control.c:98:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] media_build/v4l/hdpvr-video.c: In function 'hdpvr_try_ctrl': media_build/v4l/hdpvr-video.c:955:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] media_build/v4l/saa7134-video.c: In function 'saa7134_s_tuner': media_build/v4l/saa7134-video.c:2030:6: warning: variable 'rx' set but not used [-Wunused-but-set-variable] media_build/v4l/sn9c102_core.c: In function 'sn9c102_stream_interrupt': media_build/v4l/sn9c102_core.c:998:7: warning: variable 'timeout' set but not used [-Wunused-but-set-variable] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/au0828/au0828-video.c4
-rw-r--r--drivers/media/video/cx23885/cx23888-ir.c4
-rw-r--r--drivers/media/video/cx25840/cx25840-ir.c6
-rw-r--r--drivers/media/video/em28xx/em28xx-audio.c11
-rw-r--r--drivers/media/video/hdpvr/hdpvr-control.c2
-rw-r--r--drivers/media/video/hdpvr/hdpvr-video.c2
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c2
-rw-r--r--drivers/media/video/sn9c102/sn9c102_core.c4
8 files changed, 16 insertions, 19 deletions
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c
index 141f9c23a5ca..ac3dd733ab81 100644
--- a/drivers/media/video/au0828/au0828-video.c
+++ b/drivers/media/video/au0828/au0828-video.c
@@ -120,7 +120,7 @@ static void au0828_irq_callback(struct urb *urb)
120 struct au0828_dmaqueue *dma_q = urb->context; 120 struct au0828_dmaqueue *dma_q = urb->context;
121 struct au0828_dev *dev = container_of(dma_q, struct au0828_dev, vidq); 121 struct au0828_dev *dev = container_of(dma_q, struct au0828_dev, vidq);
122 unsigned long flags = 0; 122 unsigned long flags = 0;
123 int rc, i; 123 int i;
124 124
125 switch (urb->status) { 125 switch (urb->status) {
126 case 0: /* success */ 126 case 0: /* success */
@@ -138,7 +138,7 @@ static void au0828_irq_callback(struct urb *urb)
138 138
139 /* Copy data from URB */ 139 /* Copy data from URB */
140 spin_lock_irqsave(&dev->slock, flags); 140 spin_lock_irqsave(&dev->slock, flags);
141 rc = dev->isoc_ctl.isoc_copy(dev, urb); 141 dev->isoc_ctl.isoc_copy(dev, urb);
142 spin_unlock_irqrestore(&dev->slock, flags); 142 spin_unlock_irqrestore(&dev->slock, flags);
143 143
144 /* Reset urb buffers */ 144 /* Reset urb buffers */
diff --git a/drivers/media/video/cx23885/cx23888-ir.c b/drivers/media/video/cx23885/cx23888-ir.c
index bb1ce346425d..c2bc39c58f82 100644
--- a/drivers/media/video/cx23885/cx23888-ir.c
+++ b/drivers/media/video/cx23885/cx23888-ir.c
@@ -331,9 +331,7 @@ static u64 ns_to_pulse_clocks(u32 ns)
331 331
332static u16 pulse_clocks_to_clock_divider(u64 count) 332static u16 pulse_clocks_to_clock_divider(u64 count)
333{ 333{
334 u32 rem; 334 do_div(count, (FIFO_RXTX << 2) | 0x3);
335
336 rem = do_div(count, (FIFO_RXTX << 2) | 0x3);
337 335
338 /* net result needs to be rounded down and decremented by 1 */ 336 /* net result needs to be rounded down and decremented by 1 */
339 if (count > RXCLK_RCD + 1) 337 if (count > RXCLK_RCD + 1)
diff --git a/drivers/media/video/cx25840/cx25840-ir.c b/drivers/media/video/cx25840/cx25840-ir.c
index 13c380ebb562..38ce76ed1924 100644
--- a/drivers/media/video/cx25840/cx25840-ir.c
+++ b/drivers/media/video/cx25840/cx25840-ir.c
@@ -316,9 +316,7 @@ static u64 ns_to_pulse_clocks(u32 ns)
316 316
317static u16 pulse_clocks_to_clock_divider(u64 count) 317static u16 pulse_clocks_to_clock_divider(u64 count)
318{ 318{
319 u32 rem; 319 do_div(count, (FIFO_RXTX << 2) | 0x3);
320
321 rem = do_div(count, (FIFO_RXTX << 2) | 0x3);
322 320
323 /* net result needs to be rounded down and decremented by 1 */ 321 /* net result needs to be rounded down and decremented by 1 */
324 if (count > RXCLK_RCD + 1) 322 if (count > RXCLK_RCD + 1)
@@ -860,12 +858,10 @@ static int cx25840_ir_tx_write(struct v4l2_subdev *sd, u8 *buf, size_t count,
860 ssize_t *num) 858 ssize_t *num)
861{ 859{
862 struct cx25840_ir_state *ir_state = to_ir_state(sd); 860 struct cx25840_ir_state *ir_state = to_ir_state(sd);
863 struct i2c_client *c;
864 861
865 if (ir_state == NULL) 862 if (ir_state == NULL)
866 return -ENODEV; 863 return -ENODEV;
867 864
868 c = ir_state->c;
869#if 0 865#if 0
870 /* 866 /*
871 * FIXME - the code below is an incomplete and untested sketch of what 867 * FIXME - the code below is an incomplete and untested sketch of what
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c
index e2a7b77c39c7..d7e2a3dc5525 100644
--- a/drivers/media/video/em28xx/em28xx-audio.c
+++ b/drivers/media/video/em28xx/em28xx-audio.c
@@ -343,7 +343,6 @@ static int snd_em28xx_pcm_close(struct snd_pcm_substream *substream)
343static int snd_em28xx_hw_capture_params(struct snd_pcm_substream *substream, 343static int snd_em28xx_hw_capture_params(struct snd_pcm_substream *substream,
344 struct snd_pcm_hw_params *hw_params) 344 struct snd_pcm_hw_params *hw_params)
345{ 345{
346 unsigned int channels, rate, format;
347 int ret; 346 int ret;
348 347
349 dprintk("Setting capture parameters\n"); 348 dprintk("Setting capture parameters\n");
@@ -352,13 +351,17 @@ static int snd_em28xx_hw_capture_params(struct snd_pcm_substream *substream,
352 params_buffer_bytes(hw_params)); 351 params_buffer_bytes(hw_params));
353 if (ret < 0) 352 if (ret < 0)
354 return ret; 353 return ret;
354#if 0
355 /* TODO: set up em28xx audio chip to deliver the correct audio format,
356 current default is 48000hz multiplexed => 96000hz mono
357 which shouldn't matter since analogue TV only supports mono */
358 unsigned int channels, rate, format;
359
355 format = params_format(hw_params); 360 format = params_format(hw_params);
356 rate = params_rate(hw_params); 361 rate = params_rate(hw_params);
357 channels = params_channels(hw_params); 362 channels = params_channels(hw_params);
363#endif
358 364
359 /* TODO: set up em28xx audio chip to deliver the correct audio format,
360 current default is 48000hz multiplexed => 96000hz mono
361 which shouldn't matter since analogue TV only supports mono */
362 return 0; 365 return 0;
363} 366}
364 367
diff --git a/drivers/media/video/hdpvr/hdpvr-control.c b/drivers/media/video/hdpvr/hdpvr-control.c
index 068df4ba3f51..ae8f229d1141 100644
--- a/drivers/media/video/hdpvr/hdpvr-control.c
+++ b/drivers/media/video/hdpvr/hdpvr-control.c
@@ -113,6 +113,8 @@ int get_input_lines_info(struct hdpvr_device *dev)
113 "get input lines info returned: %d, %s\n", ret, 113 "get input lines info returned: %d, %s\n", ret,
114 print_buf); 114 print_buf);
115 } 115 }
116#else
117 (void)ret; /* suppress compiler warning */
116#endif 118#endif
117 lines = dev->usbc_buf[1] << 8 | dev->usbc_buf[0]; 119 lines = dev->usbc_buf[1] << 8 | dev->usbc_buf[0];
118 mutex_unlock(&dev->usbc_mutex); 120 mutex_unlock(&dev->usbc_mutex);
diff --git a/drivers/media/video/hdpvr/hdpvr-video.c b/drivers/media/video/hdpvr/hdpvr-video.c
index 11ffe9cc1780..0e9e156bb2aa 100644
--- a/drivers/media/video/hdpvr/hdpvr-video.c
+++ b/drivers/media/video/hdpvr/hdpvr-video.c
@@ -994,7 +994,7 @@ static int hdpvr_try_ctrl(struct v4l2_ext_control *ctrl, int ac3)
994 default: 994 default:
995 return -EINVAL; 995 return -EINVAL;
996 } 996 }
997 return 0; 997 return ret;
998} 998}
999 999
1000static int vidioc_try_ext_ctrls(struct file *file, void *priv, 1000static int vidioc_try_ext_ctrls(struct file *file, void *priv,
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index 417034eb6ad2..6de10b1e7251 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -2036,7 +2036,7 @@ static int saa7134_s_tuner(struct file *file, void *priv,
2036 mode = dev->thread.mode; 2036 mode = dev->thread.mode;
2037 if (UNSET == mode) { 2037 if (UNSET == mode) {
2038 rx = saa7134_tvaudio_getstereo(dev); 2038 rx = saa7134_tvaudio_getstereo(dev);
2039 mode = saa7134_tvaudio_rx2mode(t->rxsubchans); 2039 mode = saa7134_tvaudio_rx2mode(rx);
2040 } 2040 }
2041 if (mode != t->audmode) 2041 if (mode != t->audmode)
2042 dev->thread.mode = t->audmode; 2042 dev->thread.mode = t->audmode;
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c
index c2882fa5be85..19ea780b16ff 100644
--- a/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/drivers/media/video/sn9c102/sn9c102_core.c
@@ -995,10 +995,8 @@ static int sn9c102_stop_transfer(struct sn9c102_device* cam)
995 995
996static int sn9c102_stream_interrupt(struct sn9c102_device* cam) 996static int sn9c102_stream_interrupt(struct sn9c102_device* cam)
997{ 997{
998 long timeout;
999
1000 cam->stream = STREAM_INTERRUPT; 998 cam->stream = STREAM_INTERRUPT;
1001 timeout = wait_event_timeout(cam->wait_stream, 999 wait_event_timeout(cam->wait_stream,
1002 (cam->stream == STREAM_OFF) || 1000 (cam->stream == STREAM_OFF) ||
1003 (cam->state & DEV_DISCONNECTED), 1001 (cam->state & DEV_DISCONNECTED),
1004 SN9C102_URB_TIMEOUT); 1002 SN9C102_URB_TIMEOUT);