diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-09-04 08:33:43 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-09-04 08:33:43 +0200 |
commit | 9b4cd8c0a62769d3c668e00f4202dfd57b66f765 (patch) | |
tree | ba3b5e8333f92d2319d32891d6e43ec6ef0b18e1 /linux/drivers/media/video/em28xx | |
parent | 2f41bc61c3b5864177690d7f88d36366c3a05c5c (diff) | |
download | mediapointer-dvb-s2-9b4cd8c0a62769d3c668e00f4202dfd57b66f765.tar.gz mediapointer-dvb-s2-9b4cd8c0a62769d3c668e00f4202dfd57b66f765.tar.bz2 |
v4l-dvb: fix assorted sparse warnings
From: Hans Verkuil <hverkuil@xs4all.nl>
Fix sparse warnings. None are serious, but cutting down on these helps find
future serious sparse warnings/errors.
Redid the av7710.c patch based on a suggestion by Oliver Endriss.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/em28xx')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-dvb.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-i2c.c | 7 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx.h | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-dvb.c b/linux/drivers/media/video/em28xx/em28xx-dvb.c index 5b532ccec..79c11b1d0 100644 --- a/linux/drivers/media/video/em28xx/em28xx-dvb.c +++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c @@ -275,7 +275,7 @@ static int attach_xc3028(u8 addr, struct em28xx *dev) /* ------------------------------------------------------------------ */ -int register_dvb(struct em28xx_dvb *dvb, +static int register_dvb(struct em28xx_dvb *dvb, struct module *module, struct em28xx *dev, struct device *device) diff --git a/linux/drivers/media/video/em28xx/em28xx-i2c.c b/linux/drivers/media/video/em28xx/em28xx-i2c.c index 97853384c..2989a65f6 100644 --- a/linux/drivers/media/video/em28xx/em28xx-i2c.c +++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c @@ -143,10 +143,11 @@ static int em2800_i2c_check_for_device(struct em28xx *dev, unsigned char addr) } for (write_timeout = EM2800_I2C_WRITE_TIMEOUT; write_timeout > 0; write_timeout -= 5) { - unsigned msg = dev->em28xx_read_reg(dev, 0x5); - if (msg == 0x94) + unsigned reg = dev->em28xx_read_reg(dev, 0x5); + + if (reg == 0x94) return -ENODEV; - else if (msg == 0x84) + else if (reg == 0x84) return 0; msleep(5); } diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index e5e47fe66..4bdff9619 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -420,8 +420,8 @@ struct em28xx { /* frame properties */ int width; /* current frame width */ int height; /* current frame height */ - int hscale; /* horizontal scale factor (see datasheet) */ - int vscale; /* vertical scale factor (see datasheet) */ + unsigned hscale; /* horizontal scale factor (see datasheet) */ + unsigned vscale; /* vertical scale factor (see datasheet) */ int interlaced; /* 1=interlace fileds, 0=just top fileds */ unsigned int video_bytesread; /* Number of bytes read */ |