aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-04-23 07:25:20 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-14 13:45:48 -0400
commit932205a7ea64bab9edda04b9d555a277b57943fd (patch)
tree91b0aab9a639b5e3ef4a1ed076cb40b2bcbed08f /drivers/media/video/cx18
parentda983503ba485e3ef50662a65d0d03e80a586387 (diff)
[media] ivtv/cx18: fix compiler warnings
media_build/v4l/cx18-alsa-main.c: In function 'cx18_alsa_exit': media_build/v4l/cx18-alsa-main.c:282:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] media_build/v4l/cx18-mailbox.c: In function 'cx18_api_call': media_build/v4l/cx18-mailbox.c:598:6: warning: variable 'state' set but not used [-Wunused-but-set-variable] media_build/v4l/cx18-alsa-pcm.c: In function 'snd_cx18_pcm_capture_open': media_build/v4l/cx18-alsa-pcm.c:156:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] media_build/v4l/cx18-alsa-pcm.c: In function 'snd_cx18_pcm_capture_close': media_build/v4l/cx18-alsa-pcm.c:202:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] media_build/v4l/cx18-alsa-pcm.c: In function 'snd_cx18_pcm_hw_params': media_build/v4l/cx18-alsa-pcm.c:255:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] media_build/v4l/cx18-streams.c: In function 'cx18_stop_v4l2_encode_stream': media_build/v4l/cx18-streams.c:983:16: warning: variable 'then' set but not used [-Wunused-but-set-variable] media_build/v4l/ivtv-ioctl.c: In function 'ivtv_set_speed': media_build/v4l/ivtv-ioctl.c:138:22: warning: variable 's' set but not used [-Wunused-but-set-variable] media_build/v4l/ivtvfb.c: In function 'ivtvfb_init': media_build/v4l/ivtvfb.c:1286:6: warning: variable 'err' set but not used [-Wunused-but-set-variable] media_build/v4l/ivtvfb.c: In function 'ivtvfb_cleanup': media_build/v4l/ivtvfb.c:1306:6: warning: variable 'err' set but not used [-Wunused-but-set-variable] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18')
-rw-r--r--drivers/media/video/cx18/cx18-alsa-main.c1
-rw-r--r--drivers/media/video/cx18/cx18-alsa-pcm.c10
-rw-r--r--drivers/media/video/cx18/cx18-mailbox.c6
-rw-r--r--drivers/media/video/cx18/cx18-streams.c3
4 files changed, 5 insertions, 15 deletions
diff --git a/drivers/media/video/cx18/cx18-alsa-main.c b/drivers/media/video/cx18/cx18-alsa-main.c
index e118361c2e7b..6d2a98246b6d 100644
--- a/drivers/media/video/cx18/cx18-alsa-main.c
+++ b/drivers/media/video/cx18/cx18-alsa-main.c
@@ -285,6 +285,7 @@ static void __exit cx18_alsa_exit(void)
285 285
286 drv = driver_find("cx18", &pci_bus_type); 286 drv = driver_find("cx18", &pci_bus_type);
287 ret = driver_for_each_device(drv, NULL, NULL, cx18_alsa_exit_callback); 287 ret = driver_for_each_device(drv, NULL, NULL, cx18_alsa_exit_callback);
288 (void)ret; /* suppress compiler warning */
288 289
289 cx18_ext_init = NULL; 290 cx18_ext_init = NULL;
290 printk(KERN_INFO "cx18-alsa: module unload complete\n"); 291 printk(KERN_INFO "cx18-alsa: module unload complete\n");
diff --git a/drivers/media/video/cx18/cx18-alsa-pcm.c b/drivers/media/video/cx18/cx18-alsa-pcm.c
index 82d195be9197..7a5b84a86bb3 100644
--- a/drivers/media/video/cx18/cx18-alsa-pcm.c
+++ b/drivers/media/video/cx18/cx18-alsa-pcm.c
@@ -190,7 +190,7 @@ static int snd_cx18_pcm_capture_open(struct snd_pcm_substream *substream)
190 ret = cx18_start_v4l2_encode_stream(s); 190 ret = cx18_start_v4l2_encode_stream(s);
191 snd_cx18_unlock(cxsc); 191 snd_cx18_unlock(cxsc);
192 192
193 return 0; 193 return ret;
194} 194}
195 195
196static int snd_cx18_pcm_capture_close(struct snd_pcm_substream *substream) 196static int snd_cx18_pcm_capture_close(struct snd_pcm_substream *substream)
@@ -199,12 +199,11 @@ static int snd_cx18_pcm_capture_close(struct snd_pcm_substream *substream)
199 struct v4l2_device *v4l2_dev = cxsc->v4l2_dev; 199 struct v4l2_device *v4l2_dev = cxsc->v4l2_dev;
200 struct cx18 *cx = to_cx18(v4l2_dev); 200 struct cx18 *cx = to_cx18(v4l2_dev);
201 struct cx18_stream *s; 201 struct cx18_stream *s;
202 int ret;
203 202
204 /* Instruct the cx18 to stop sending packets */ 203 /* Instruct the cx18 to stop sending packets */
205 snd_cx18_lock(cxsc); 204 snd_cx18_lock(cxsc);
206 s = &cx->streams[CX18_ENC_STREAM_TYPE_PCM]; 205 s = &cx->streams[CX18_ENC_STREAM_TYPE_PCM];
207 ret = cx18_stop_v4l2_encode_stream(s, 0); 206 cx18_stop_v4l2_encode_stream(s, 0);
208 clear_bit(CX18_F_S_STREAMING, &s->s_flags); 207 clear_bit(CX18_F_S_STREAMING, &s->s_flags);
209 208
210 cx18_release_stream(s); 209 cx18_release_stream(s);
@@ -252,13 +251,10 @@ static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs,
252static int snd_cx18_pcm_hw_params(struct snd_pcm_substream *substream, 251static int snd_cx18_pcm_hw_params(struct snd_pcm_substream *substream,
253 struct snd_pcm_hw_params *params) 252 struct snd_pcm_hw_params *params)
254{ 253{
255 int ret;
256
257 dprintk("%s called\n", __func__); 254 dprintk("%s called\n", __func__);
258 255
259 ret = snd_pcm_alloc_vmalloc_buffer(substream, 256 return snd_pcm_alloc_vmalloc_buffer(substream,
260 params_buffer_bytes(params)); 257 params_buffer_bytes(params));
261 return 0;
262} 258}
263 259
264static int snd_cx18_pcm_hw_free(struct snd_pcm_substream *substream) 260static int snd_cx18_pcm_hw_free(struct snd_pcm_substream *substream)
diff --git a/drivers/media/video/cx18/cx18-mailbox.c b/drivers/media/video/cx18/cx18-mailbox.c
index 0c7796e76ac0..ed8118390b02 100644
--- a/drivers/media/video/cx18/cx18-mailbox.c
+++ b/drivers/media/video/cx18/cx18-mailbox.c
@@ -595,9 +595,8 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu)
595static int cx18_api_call(struct cx18 *cx, u32 cmd, int args, u32 data[]) 595static int cx18_api_call(struct cx18 *cx, u32 cmd, int args, u32 data[])
596{ 596{
597 const struct cx18_api_info *info = find_api_info(cmd); 597 const struct cx18_api_info *info = find_api_info(cmd);
598 u32 state, irq, req, ack, err; 598 u32 irq, req, ack, err;
599 struct cx18_mailbox __iomem *mb; 599 struct cx18_mailbox __iomem *mb;
600 u32 __iomem *xpu_state;
601 wait_queue_head_t *waitq; 600 wait_queue_head_t *waitq;
602 struct mutex *mb_lock; 601 struct mutex *mb_lock;
603 unsigned long int t0, timeout, ret; 602 unsigned long int t0, timeout, ret;
@@ -628,14 +627,12 @@ static int cx18_api_call(struct cx18 *cx, u32 cmd, int args, u32 data[])
628 mb_lock = &cx->epu2apu_mb_lock; 627 mb_lock = &cx->epu2apu_mb_lock;
629 irq = IRQ_EPU_TO_APU; 628 irq = IRQ_EPU_TO_APU;
630 mb = &cx->scb->epu2apu_mb; 629 mb = &cx->scb->epu2apu_mb;
631 xpu_state = &cx->scb->apu_state;
632 break; 630 break;
633 case CPU: 631 case CPU:
634 waitq = &cx->mb_cpu_waitq; 632 waitq = &cx->mb_cpu_waitq;
635 mb_lock = &cx->epu2cpu_mb_lock; 633 mb_lock = &cx->epu2cpu_mb_lock;
636 irq = IRQ_EPU_TO_CPU; 634 irq = IRQ_EPU_TO_CPU;
637 mb = &cx->scb->epu2cpu_mb; 635 mb = &cx->scb->epu2cpu_mb;
638 xpu_state = &cx->scb->cpu_state;
639 break; 636 break;
640 default: 637 default:
641 CX18_WARN("Unknown RPU (%d) for API call\n", info->rpu); 638 CX18_WARN("Unknown RPU (%d) for API call\n", info->rpu);
@@ -653,7 +650,6 @@ static int cx18_api_call(struct cx18 *cx, u32 cmd, int args, u32 data[])
653 * by a signal, we may get here and find a busy mailbox. After waiting, 650 * by a signal, we may get here and find a busy mailbox. After waiting,
654 * mark it "not busy" from our end, if the XPU hasn't ack'ed it still. 651 * mark it "not busy" from our end, if the XPU hasn't ack'ed it still.
655 */ 652 */
656 state = cx18_readl(cx, xpu_state);
657 req = cx18_readl(cx, &mb->request); 653 req = cx18_readl(cx, &mb->request);
658 timeout = msecs_to_jiffies(10); 654 timeout = msecs_to_jiffies(10);
659 ret = wait_event_timeout(*waitq, 655 ret = wait_event_timeout(*waitq,
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c
index 638cca156b58..4185bcb80ca3 100644
--- a/drivers/media/video/cx18/cx18-streams.c
+++ b/drivers/media/video/cx18/cx18-streams.c
@@ -980,7 +980,6 @@ void cx18_stop_all_captures(struct cx18 *cx)
980int cx18_stop_v4l2_encode_stream(struct cx18_stream *s, int gop_end) 980int cx18_stop_v4l2_encode_stream(struct cx18_stream *s, int gop_end)
981{ 981{
982 struct cx18 *cx = s->cx; 982 struct cx18 *cx = s->cx;
983 unsigned long then;
984 983
985 if (!cx18_stream_enabled(s)) 984 if (!cx18_stream_enabled(s))
986 return -EINVAL; 985 return -EINVAL;
@@ -999,8 +998,6 @@ int cx18_stop_v4l2_encode_stream(struct cx18_stream *s, int gop_end)
999 else 998 else
1000 cx18_vapi(cx, CX18_CPU_CAPTURE_STOP, 1, s->handle); 999 cx18_vapi(cx, CX18_CPU_CAPTURE_STOP, 1, s->handle);
1001 1000
1002 then = jiffies;
1003
1004 if (s->type == CX18_ENC_STREAM_TYPE_MPG && gop_end) { 1001 if (s->type == CX18_ENC_STREAM_TYPE_MPG && gop_end) {
1005 CX18_INFO("ignoring gop_end: not (yet?) supported by the firmware\n"); 1002 CX18_INFO("ignoring gop_end: not (yet?) supported by the firmware\n");
1006 } 1003 }