diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-09-03 16:11:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-09-03 17:37:13 -0400 |
commit | c6eb8eafdba4ad18b4520a0d28a38bc9e61883ea (patch) | |
tree | 8b580ce4ac05617bc760272fb29382b1ffc73bad /drivers/media/common | |
parent | 980d4f17345fe420fda2a84cd4a28d5d41d73cef (diff) |
V4L/DVB (8757): v4l-dvb: fix a bunch of sparse warnings
Fixed a lot of sparse warnings: mostly warnings about shadowed variables
and signed/unsigned mismatches.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/saa7146_video.c | 4 | ||||
-rw-r--r-- | drivers/media/common/tuners/tuner-simple.c | 33 |
2 files changed, 18 insertions, 19 deletions
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index e8bc7abf2409..99be9e5c85f7 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c | |||
@@ -1068,7 +1068,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int | |||
1068 | { | 1068 | { |
1069 | v4l2_std_id *id = arg; | 1069 | v4l2_std_id *id = arg; |
1070 | int found = 0; | 1070 | int found = 0; |
1071 | int i, err; | 1071 | int i; |
1072 | 1072 | ||
1073 | DEB_EE(("VIDIOC_S_STD\n")); | 1073 | DEB_EE(("VIDIOC_S_STD\n")); |
1074 | 1074 | ||
@@ -1116,7 +1116,6 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int | |||
1116 | case VIDIOC_OVERLAY: | 1116 | case VIDIOC_OVERLAY: |
1117 | { | 1117 | { |
1118 | int on = *(int *)arg; | 1118 | int on = *(int *)arg; |
1119 | int err = 0; | ||
1120 | 1119 | ||
1121 | DEB_D(("VIDIOC_OVERLAY on:%d\n",on)); | 1120 | DEB_D(("VIDIOC_OVERLAY on:%d\n",on)); |
1122 | if (on != 0) { | 1121 | if (on != 0) { |
@@ -1192,7 +1191,6 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int | |||
1192 | case VIDIOCGMBUF: | 1191 | case VIDIOCGMBUF: |
1193 | { | 1192 | { |
1194 | struct video_mbuf *mbuf = arg; | 1193 | struct video_mbuf *mbuf = arg; |
1195 | struct videobuf_queue *q; | ||
1196 | int i; | 1194 | int i; |
1197 | 1195 | ||
1198 | /* fixme: number of capture buffers and sizes for v4l apps */ | 1196 | /* fixme: number of capture buffers and sizes for v4l apps */ |
diff --git a/drivers/media/common/tuners/tuner-simple.c b/drivers/media/common/tuners/tuner-simple.c index 597e47f5d69c..aa773a658a2a 100644 --- a/drivers/media/common/tuners/tuner-simple.c +++ b/drivers/media/common/tuners/tuner-simple.c | |||
@@ -253,7 +253,7 @@ static struct tuner_params *simple_tuner_params(struct dvb_frontend *fe, | |||
253 | 253 | ||
254 | static int simple_config_lookup(struct dvb_frontend *fe, | 254 | static int simple_config_lookup(struct dvb_frontend *fe, |
255 | struct tuner_params *t_params, | 255 | struct tuner_params *t_params, |
256 | int *frequency, u8 *config, u8 *cb) | 256 | unsigned *frequency, u8 *config, u8 *cb) |
257 | { | 257 | { |
258 | struct tuner_simple_priv *priv = fe->tuner_priv; | 258 | struct tuner_simple_priv *priv = fe->tuner_priv; |
259 | int i; | 259 | int i; |
@@ -587,45 +587,45 @@ static int simple_set_tv_freq(struct dvb_frontend *fe, | |||
587 | priv->last_div = div; | 587 | priv->last_div = div; |
588 | if (t_params->has_tda9887) { | 588 | if (t_params->has_tda9887) { |
589 | struct v4l2_priv_tun_config tda9887_cfg; | 589 | struct v4l2_priv_tun_config tda9887_cfg; |
590 | int config = 0; | 590 | int tda_config = 0; |
591 | int is_secam_l = (params->std & (V4L2_STD_SECAM_L | | 591 | int is_secam_l = (params->std & (V4L2_STD_SECAM_L | |
592 | V4L2_STD_SECAM_LC)) && | 592 | V4L2_STD_SECAM_LC)) && |
593 | !(params->std & ~(V4L2_STD_SECAM_L | | 593 | !(params->std & ~(V4L2_STD_SECAM_L | |
594 | V4L2_STD_SECAM_LC)); | 594 | V4L2_STD_SECAM_LC)); |
595 | 595 | ||
596 | tda9887_cfg.tuner = TUNER_TDA9887; | 596 | tda9887_cfg.tuner = TUNER_TDA9887; |
597 | tda9887_cfg.priv = &config; | 597 | tda9887_cfg.priv = &tda_config; |
598 | 598 | ||
599 | if (params->std == V4L2_STD_SECAM_LC) { | 599 | if (params->std == V4L2_STD_SECAM_LC) { |
600 | if (t_params->port1_active ^ t_params->port1_invert_for_secam_lc) | 600 | if (t_params->port1_active ^ t_params->port1_invert_for_secam_lc) |
601 | config |= TDA9887_PORT1_ACTIVE; | 601 | tda_config |= TDA9887_PORT1_ACTIVE; |
602 | if (t_params->port2_active ^ t_params->port2_invert_for_secam_lc) | 602 | if (t_params->port2_active ^ t_params->port2_invert_for_secam_lc) |
603 | config |= TDA9887_PORT2_ACTIVE; | 603 | tda_config |= TDA9887_PORT2_ACTIVE; |
604 | } else { | 604 | } else { |
605 | if (t_params->port1_active) | 605 | if (t_params->port1_active) |
606 | config |= TDA9887_PORT1_ACTIVE; | 606 | tda_config |= TDA9887_PORT1_ACTIVE; |
607 | if (t_params->port2_active) | 607 | if (t_params->port2_active) |
608 | config |= TDA9887_PORT2_ACTIVE; | 608 | tda_config |= TDA9887_PORT2_ACTIVE; |
609 | } | 609 | } |
610 | if (t_params->intercarrier_mode) | 610 | if (t_params->intercarrier_mode) |
611 | config |= TDA9887_INTERCARRIER; | 611 | tda_config |= TDA9887_INTERCARRIER; |
612 | if (is_secam_l) { | 612 | if (is_secam_l) { |
613 | if (i == 0 && t_params->default_top_secam_low) | 613 | if (i == 0 && t_params->default_top_secam_low) |
614 | config |= TDA9887_TOP(t_params->default_top_secam_low); | 614 | tda_config |= TDA9887_TOP(t_params->default_top_secam_low); |
615 | else if (i == 1 && t_params->default_top_secam_mid) | 615 | else if (i == 1 && t_params->default_top_secam_mid) |
616 | config |= TDA9887_TOP(t_params->default_top_secam_mid); | 616 | tda_config |= TDA9887_TOP(t_params->default_top_secam_mid); |
617 | else if (t_params->default_top_secam_high) | 617 | else if (t_params->default_top_secam_high) |
618 | config |= TDA9887_TOP(t_params->default_top_secam_high); | 618 | tda_config |= TDA9887_TOP(t_params->default_top_secam_high); |
619 | } else { | 619 | } else { |
620 | if (i == 0 && t_params->default_top_low) | 620 | if (i == 0 && t_params->default_top_low) |
621 | config |= TDA9887_TOP(t_params->default_top_low); | 621 | tda_config |= TDA9887_TOP(t_params->default_top_low); |
622 | else if (i == 1 && t_params->default_top_mid) | 622 | else if (i == 1 && t_params->default_top_mid) |
623 | config |= TDA9887_TOP(t_params->default_top_mid); | 623 | tda_config |= TDA9887_TOP(t_params->default_top_mid); |
624 | else if (t_params->default_top_high) | 624 | else if (t_params->default_top_high) |
625 | config |= TDA9887_TOP(t_params->default_top_high); | 625 | tda_config |= TDA9887_TOP(t_params->default_top_high); |
626 | } | 626 | } |
627 | if (t_params->default_pll_gating_18) | 627 | if (t_params->default_pll_gating_18) |
628 | config |= TDA9887_GATING_18; | 628 | tda_config |= TDA9887_GATING_18; |
629 | i2c_clients_command(priv->i2c_props.adap, TUNER_SET_CONFIG, | 629 | i2c_clients_command(priv->i2c_props.adap, TUNER_SET_CONFIG, |
630 | &tda9887_cfg); | 630 | &tda9887_cfg); |
631 | } | 631 | } |
@@ -813,7 +813,8 @@ static u32 simple_dvb_configure(struct dvb_frontend *fe, u8 *buf, | |||
813 | static struct tuner_params *t_params; | 813 | static struct tuner_params *t_params; |
814 | u8 config, cb; | 814 | u8 config, cb; |
815 | u32 div; | 815 | u32 div; |
816 | int ret, frequency = params->frequency / 62500; | 816 | int ret; |
817 | unsigned frequency = params->frequency / 62500; | ||
817 | 818 | ||
818 | t_params = simple_tuner_params(fe, TUNER_PARAM_TYPE_DIGITAL); | 819 | t_params = simple_tuner_params(fe, TUNER_PARAM_TYPE_DIGITAL); |
819 | ret = simple_config_lookup(fe, t_params, &frequency, &config, &cb); | 820 | ret = simple_config_lookup(fe, t_params, &frequency, &config, &cb); |