aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx/bttv.h
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2009-01-28 21:32:58 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:42:46 -0300
commit4ef2ccc2611456667ea78c6f418ce87e1fa9fac5 (patch)
treeedb8e2540969dfe6143cd75c35ed18d1937f74df /drivers/media/video/bt8xx/bttv.h
parentV4L/DVB (10556): em28xx-cards: Add Pinnacle Dazzle Video Creator Plus DVC107 description (diff)
downloadlinux-dev-4ef2ccc2611456667ea78c6f418ce87e1fa9fac5.tar.xz
linux-dev-4ef2ccc2611456667ea78c6f418ce87e1fa9fac5.zip
V4L/DVB (10558): bttv: norm value should be unsigned
The norm value in the driver is an index into an array and the the driver doesn't allow it to be negative or otherwise invalid. It should be unsigned but wasn't in all places. Fix some structs and functions to have the norm be unsigned. Get rid of useless checks for "< 0". Most of the driver code can't handle a norm value that's out of range, so change some ">= BTTV_TVNORMS" checks to BUG_ON(). There's no point in silently ignoring invalid driver state just to crash because of it later. Reported-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/bt8xx/bttv.h')
-rw-r--r--drivers/media/video/bt8xx/bttv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/bt8xx/bttv.h b/drivers/media/video/bt8xx/bttv.h
index a7bcad171823..b1986b94d29f 100644
--- a/drivers/media/video/bt8xx/bttv.h
+++ b/drivers/media/video/bt8xx/bttv.h
@@ -265,7 +265,7 @@ extern void bttv_init_card2(struct bttv *btv);
/* card-specific funtions */
extern void tea5757_set_freq(struct bttv *btv, unsigned short freq);
-extern void bttv_tda9880_setnorm(struct bttv *btv, int norm);
+extern void bttv_tda9880_setnorm(struct bttv *btv, unsigned int norm);
/* extra tweaks for some chipsets */
extern void bttv_check_chipset(void);