[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>
This commit is contained in:
parent
30fdf03587
commit
e92ba2830b
|
@ -120,7 +120,7 @@ static void au0828_irq_callback(struct urb *urb)
|
||||||
struct au0828_dmaqueue *dma_q = urb->context;
|
struct au0828_dmaqueue *dma_q = urb->context;
|
||||||
struct au0828_dev *dev = container_of(dma_q, struct au0828_dev, vidq);
|
struct au0828_dev *dev = container_of(dma_q, struct au0828_dev, vidq);
|
||||||
unsigned long flags = 0;
|
unsigned long flags = 0;
|
||||||
int rc, i;
|
int i;
|
||||||
|
|
||||||
switch (urb->status) {
|
switch (urb->status) {
|
||||||
case 0: /* success */
|
case 0: /* success */
|
||||||
|
@ -138,7 +138,7 @@ static void au0828_irq_callback(struct urb *urb)
|
||||||
|
|
||||||
/* Copy data from URB */
|
/* Copy data from URB */
|
||||||
spin_lock_irqsave(&dev->slock, flags);
|
spin_lock_irqsave(&dev->slock, flags);
|
||||||
rc = dev->isoc_ctl.isoc_copy(dev, urb);
|
dev->isoc_ctl.isoc_copy(dev, urb);
|
||||||
spin_unlock_irqrestore(&dev->slock, flags);
|
spin_unlock_irqrestore(&dev->slock, flags);
|
||||||
|
|
||||||
/* Reset urb buffers */
|
/* Reset urb buffers */
|
||||||
|
|
|
@ -331,9 +331,7 @@ static u64 ns_to_pulse_clocks(u32 ns)
|
||||||
|
|
||||||
static u16 pulse_clocks_to_clock_divider(u64 count)
|
static u16 pulse_clocks_to_clock_divider(u64 count)
|
||||||
{
|
{
|
||||||
u32 rem;
|
do_div(count, (FIFO_RXTX << 2) | 0x3);
|
||||||
|
|
||||||
rem = do_div(count, (FIFO_RXTX << 2) | 0x3);
|
|
||||||
|
|
||||||
/* net result needs to be rounded down and decremented by 1 */
|
/* net result needs to be rounded down and decremented by 1 */
|
||||||
if (count > RXCLK_RCD + 1)
|
if (count > RXCLK_RCD + 1)
|
||||||
|
|
|
@ -316,9 +316,7 @@ static u64 ns_to_pulse_clocks(u32 ns)
|
||||||
|
|
||||||
static u16 pulse_clocks_to_clock_divider(u64 count)
|
static u16 pulse_clocks_to_clock_divider(u64 count)
|
||||||
{
|
{
|
||||||
u32 rem;
|
do_div(count, (FIFO_RXTX << 2) | 0x3);
|
||||||
|
|
||||||
rem = do_div(count, (FIFO_RXTX << 2) | 0x3);
|
|
||||||
|
|
||||||
/* net result needs to be rounded down and decremented by 1 */
|
/* net result needs to be rounded down and decremented by 1 */
|
||||||
if (count > RXCLK_RCD + 1)
|
if (count > RXCLK_RCD + 1)
|
||||||
|
@ -860,12 +858,10 @@ static int cx25840_ir_tx_write(struct v4l2_subdev *sd, u8 *buf, size_t count,
|
||||||
ssize_t *num)
|
ssize_t *num)
|
||||||
{
|
{
|
||||||
struct cx25840_ir_state *ir_state = to_ir_state(sd);
|
struct cx25840_ir_state *ir_state = to_ir_state(sd);
|
||||||
struct i2c_client *c;
|
|
||||||
|
|
||||||
if (ir_state == NULL)
|
if (ir_state == NULL)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
c = ir_state->c;
|
|
||||||
#if 0
|
#if 0
|
||||||
/*
|
/*
|
||||||
* FIXME - the code below is an incomplete and untested sketch of what
|
* FIXME - the code below is an incomplete and untested sketch of what
|
||||||
|
|
|
@ -343,7 +343,6 @@ static int snd_em28xx_pcm_close(struct snd_pcm_substream *substream)
|
||||||
static int snd_em28xx_hw_capture_params(struct snd_pcm_substream *substream,
|
static int snd_em28xx_hw_capture_params(struct snd_pcm_substream *substream,
|
||||||
struct snd_pcm_hw_params *hw_params)
|
struct snd_pcm_hw_params *hw_params)
|
||||||
{
|
{
|
||||||
unsigned int channels, rate, format;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
dprintk("Setting capture parameters\n");
|
dprintk("Setting capture parameters\n");
|
||||||
|
@ -352,13 +351,17 @@ static int snd_em28xx_hw_capture_params(struct snd_pcm_substream *substream,
|
||||||
params_buffer_bytes(hw_params));
|
params_buffer_bytes(hw_params));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
format = params_format(hw_params);
|
#if 0
|
||||||
rate = params_rate(hw_params);
|
|
||||||
channels = params_channels(hw_params);
|
|
||||||
|
|
||||||
/* TODO: set up em28xx audio chip to deliver the correct audio format,
|
/* TODO: set up em28xx audio chip to deliver the correct audio format,
|
||||||
current default is 48000hz multiplexed => 96000hz mono
|
current default is 48000hz multiplexed => 96000hz mono
|
||||||
which shouldn't matter since analogue TV only supports mono */
|
which shouldn't matter since analogue TV only supports mono */
|
||||||
|
unsigned int channels, rate, format;
|
||||||
|
|
||||||
|
format = params_format(hw_params);
|
||||||
|
rate = params_rate(hw_params);
|
||||||
|
channels = params_channels(hw_params);
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,8 @@ int get_input_lines_info(struct hdpvr_device *dev)
|
||||||
"get input lines info returned: %d, %s\n", ret,
|
"get input lines info returned: %d, %s\n", ret,
|
||||||
print_buf);
|
print_buf);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void)ret; /* suppress compiler warning */
|
||||||
#endif
|
#endif
|
||||||
lines = dev->usbc_buf[1] << 8 | dev->usbc_buf[0];
|
lines = dev->usbc_buf[1] << 8 | dev->usbc_buf[0];
|
||||||
mutex_unlock(&dev->usbc_mutex);
|
mutex_unlock(&dev->usbc_mutex);
|
||||||
|
|
|
@ -994,7 +994,7 @@ static int hdpvr_try_ctrl(struct v4l2_ext_control *ctrl, int ac3)
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_try_ext_ctrls(struct file *file, void *priv,
|
static int vidioc_try_ext_ctrls(struct file *file, void *priv,
|
||||||
|
|
|
@ -2036,7 +2036,7 @@ static int saa7134_s_tuner(struct file *file, void *priv,
|
||||||
mode = dev->thread.mode;
|
mode = dev->thread.mode;
|
||||||
if (UNSET == mode) {
|
if (UNSET == mode) {
|
||||||
rx = saa7134_tvaudio_getstereo(dev);
|
rx = saa7134_tvaudio_getstereo(dev);
|
||||||
mode = saa7134_tvaudio_rx2mode(t->rxsubchans);
|
mode = saa7134_tvaudio_rx2mode(rx);
|
||||||
}
|
}
|
||||||
if (mode != t->audmode)
|
if (mode != t->audmode)
|
||||||
dev->thread.mode = t->audmode;
|
dev->thread.mode = t->audmode;
|
||||||
|
|
|
@ -995,10 +995,8 @@ static int sn9c102_stop_transfer(struct sn9c102_device* cam)
|
||||||
|
|
||||||
static int sn9c102_stream_interrupt(struct sn9c102_device* cam)
|
static int sn9c102_stream_interrupt(struct sn9c102_device* cam)
|
||||||
{
|
{
|
||||||
long timeout;
|
|
||||||
|
|
||||||
cam->stream = STREAM_INTERRUPT;
|
cam->stream = STREAM_INTERRUPT;
|
||||||
timeout = wait_event_timeout(cam->wait_stream,
|
wait_event_timeout(cam->wait_stream,
|
||||||
(cam->stream == STREAM_OFF) ||
|
(cam->stream == STREAM_OFF) ||
|
||||||
(cam->state & DEV_DISCONNECTED),
|
(cam->state & DEV_DISCONNECTED),
|
||||||
SN9C102_URB_TIMEOUT);
|
SN9C102_URB_TIMEOUT);
|
||||||
|
|
Loading…
Reference in New Issue