aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-09-04 02:33:43 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:36:58 -0400
commitd45b9b8ab43c8973a9630ac54f4ede6c3e009f9e (patch)
treed5937a21d2d7520cc937a93ce7caa8665a96303f /drivers/media/dvb
parent2bb87c24d7d5639bff65b41b1306542d6d2bf7d0 (diff)
V4L/DVB (8906): v4l-dvb: fix assorted sparse warnings
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. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-usb/af9005-remote.c2
-rw-r--r--drivers/media/dvb/dvb-usb/af9005-script.h2
-rw-r--r--drivers/media/dvb/dvb-usb/af9005.c23
-rw-r--r--drivers/media/dvb/frontends/cx24110.h15
-rw-r--r--drivers/media/dvb/frontends/dib7000m.c3
-rw-r--r--drivers/media/dvb/frontends/dvb_dummy_fe.c4
-rw-r--r--drivers/media/dvb/frontends/sp887x.c3
-rw-r--r--drivers/media/dvb/ttpci/av7110.c12
8 files changed, 33 insertions, 31 deletions
diff --git a/drivers/media/dvb/dvb-usb/af9005-remote.c b/drivers/media/dvb/dvb-usb/af9005-remote.c
index ff00c0e8f4a1..7c596f926764 100644
--- a/drivers/media/dvb/dvb-usb/af9005-remote.c
+++ b/drivers/media/dvb/dvb-usb/af9005-remote.c
@@ -25,7 +25,7 @@
25 */ 25 */
26#include "af9005.h" 26#include "af9005.h"
27/* debug */ 27/* debug */
28int dvb_usb_af9005_remote_debug; 28static int dvb_usb_af9005_remote_debug;
29module_param_named(debug, dvb_usb_af9005_remote_debug, int, 0644); 29module_param_named(debug, dvb_usb_af9005_remote_debug, int, 0644);
30MODULE_PARM_DESC(debug, 30MODULE_PARM_DESC(debug,
31 "enable (1) or disable (0) debug messages." 31 "enable (1) or disable (0) debug messages."
diff --git a/drivers/media/dvb/dvb-usb/af9005-script.h b/drivers/media/dvb/dvb-usb/af9005-script.h
index 6eeaae51b1ca..4d69045426dd 100644
--- a/drivers/media/dvb/dvb-usb/af9005-script.h
+++ b/drivers/media/dvb/dvb-usb/af9005-script.h
@@ -14,7 +14,7 @@ typedef struct {
14 u8 val; 14 u8 val;
15} RegDesc; 15} RegDesc;
16 16
17RegDesc script[] = { 17static RegDesc script[] = {
18 {0xa180, 0x0, 0x8, 0xa}, 18 {0xa180, 0x0, 0x8, 0xa},
19 {0xa181, 0x0, 0x8, 0xd7}, 19 {0xa181, 0x0, 0x8, 0xd7},
20 {0xa182, 0x0, 0x8, 0xa3}, 20 {0xa182, 0x0, 0x8, 0xa3},
diff --git a/drivers/media/dvb/dvb-usb/af9005.c b/drivers/media/dvb/dvb-usb/af9005.c
index cfe71feefcad..ca5a0a4d2a47 100644
--- a/drivers/media/dvb/dvb-usb/af9005.c
+++ b/drivers/media/dvb/dvb-usb/af9005.c
@@ -35,17 +35,17 @@ module_param_named(led, dvb_usb_af9005_led, bool, 0644);
35MODULE_PARM_DESC(led, "enable led (default: 1)."); 35MODULE_PARM_DESC(led, "enable led (default: 1).");
36 36
37/* eeprom dump */ 37/* eeprom dump */
38int dvb_usb_af9005_dump_eeprom = 0; 38static int dvb_usb_af9005_dump_eeprom;
39module_param_named(dump_eeprom, dvb_usb_af9005_dump_eeprom, int, 0); 39module_param_named(dump_eeprom, dvb_usb_af9005_dump_eeprom, int, 0);
40MODULE_PARM_DESC(dump_eeprom, "dump contents of the eeprom."); 40MODULE_PARM_DESC(dump_eeprom, "dump contents of the eeprom.");
41 41
42DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); 42DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
43 43
44/* remote control decoder */ 44/* remote control decoder */
45int (*rc_decode) (struct dvb_usb_device * d, u8 * data, int len, u32 * event, 45static int (*rc_decode) (struct dvb_usb_device *d, u8 *data, int len,
46 int *state); 46 u32 *event, int *state);
47void *rc_keys; 47static void *rc_keys;
48int *rc_keys_size; 48static int *rc_keys_size;
49 49
50u8 regmask[8] = { 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff }; 50u8 regmask[8] = { 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
51 51
@@ -54,8 +54,8 @@ struct af9005_device_state {
54 int led_state; 54 int led_state;
55}; 55};
56 56
57int af9005_usb_generic_rw(struct dvb_usb_device *d, u8 * wbuf, u16 wlen, 57static int af9005_usb_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen,
58 u8 * rbuf, u16 rlen, int delay_ms) 58 u8 *rbuf, u16 rlen, int delay_ms)
59{ 59{
60 int actlen, ret = -ENOMEM; 60 int actlen, ret = -ENOMEM;
61 61
@@ -98,12 +98,7 @@ int af9005_usb_generic_rw(struct dvb_usb_device *d, u8 * wbuf, u16 wlen,
98 return ret; 98 return ret;
99} 99}
100 100
101int af9005_usb_generic_write(struct dvb_usb_device *d, u8 * buf, u16 len) 101static int af9005_generic_read_write(struct dvb_usb_device *d, u16 reg,
102{
103 return af9005_usb_generic_rw(d, buf, len, NULL, 0, 0);
104}
105
106int af9005_generic_read_write(struct dvb_usb_device *d, u16 reg,
107 int readwrite, int type, u8 * values, int len) 102 int readwrite, int type, u8 * values, int len)
108{ 103{
109 struct af9005_device_state *st = d->priv; 104 struct af9005_device_state *st = d->priv;
@@ -765,7 +760,7 @@ static int af9005_boot_packet(struct usb_device *udev, int type, u8 * reply)
765 return 0; 760 return 0;
766} 761}
767 762
768int af9005_download_firmware(struct usb_device *udev, const struct firmware *fw) 763static int af9005_download_firmware(struct usb_device *udev, const struct firmware *fw)
769{ 764{
770 int i, packets, ret, act_len; 765 int i, packets, ret, act_len;
771 766
diff --git a/drivers/media/dvb/frontends/cx24110.h b/drivers/media/dvb/frontends/cx24110.h
index 1792adb23c4d..fdcceee91f3a 100644
--- a/drivers/media/dvb/frontends/cx24110.h
+++ b/drivers/media/dvb/frontends/cx24110.h
@@ -33,12 +33,17 @@ struct cx24110_config
33 u8 demod_address; 33 u8 demod_address;
34}; 34};
35 35
36static inline int cx24110_pll_write(struct dvb_frontend *fe, u32 val) { 36static inline int cx24110_pll_write(struct dvb_frontend *fe, u32 val)
37 int r = 0; 37{
38 u8 buf[] = {(u8) (val>>24), (u8) (val>>16), (u8) (val>>8)}; 38 u8 buf[] = {
39 (u8)((val >> 24) & 0xff),
40 (u8)((val >> 16) & 0xff),
41 (u8)((val >> 8) & 0xff)
42 };
43
39 if (fe->ops.write) 44 if (fe->ops.write)
40 r = fe->ops.write(fe, buf, 3); 45 return fe->ops.write(fe, buf, 3);
41 return r; 46 return 0;
42} 47}
43 48
44#if defined(CONFIG_DVB_CX24110) || (defined(CONFIG_DVB_CX24110_MODULE) && defined(MODULE)) 49#if defined(CONFIG_DVB_CX24110) || (defined(CONFIG_DVB_CX24110_MODULE) && defined(MODULE))
diff --git a/drivers/media/dvb/frontends/dib7000m.c b/drivers/media/dvb/frontends/dib7000m.c
index 5f1375e30dfc..4de0fa9b69ad 100644
--- a/drivers/media/dvb/frontends/dib7000m.c
+++ b/drivers/media/dvb/frontends/dib7000m.c
@@ -1284,7 +1284,8 @@ struct i2c_adapter * dib7000m_get_i2c_master(struct dvb_frontend *demod, enum di
1284} 1284}
1285EXPORT_SYMBOL(dib7000m_get_i2c_master); 1285EXPORT_SYMBOL(dib7000m_get_i2c_master);
1286 1286
1287int dib7000m_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 default_addr, struct dib7000m_config cfg[]) 1287static int dib7000m_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods,
1288 u8 default_addr, struct dib7000m_config cfg[])
1288{ 1289{
1289 struct dib7000m_state st = { .i2c_adap = i2c }; 1290 struct dib7000m_state st = { .i2c_adap = i2c };
1290 int k = 0; 1291 int k = 0;
diff --git a/drivers/media/dvb/frontends/dvb_dummy_fe.c b/drivers/media/dvb/frontends/dvb_dummy_fe.c
index cb4d8a3b9d8b..db8a937cc630 100644
--- a/drivers/media/dvb/frontends/dvb_dummy_fe.c
+++ b/drivers/media/dvb/frontends/dvb_dummy_fe.c
@@ -132,7 +132,7 @@ error:
132 132
133static struct dvb_frontend_ops dvb_dummy_fe_qpsk_ops; 133static struct dvb_frontend_ops dvb_dummy_fe_qpsk_ops;
134 134
135struct dvb_frontend* dvb_dummy_fe_qpsk_attach() 135struct dvb_frontend *dvb_dummy_fe_qpsk_attach(void)
136{ 136{
137 struct dvb_dummy_fe_state* state = NULL; 137 struct dvb_dummy_fe_state* state = NULL;
138 138
@@ -152,7 +152,7 @@ error:
152 152
153static struct dvb_frontend_ops dvb_dummy_fe_qam_ops; 153static struct dvb_frontend_ops dvb_dummy_fe_qam_ops;
154 154
155struct dvb_frontend* dvb_dummy_fe_qam_attach() 155struct dvb_frontend *dvb_dummy_fe_qam_attach(void)
156{ 156{
157 struct dvb_dummy_fe_state* state = NULL; 157 struct dvb_dummy_fe_state* state = NULL;
158 158
diff --git a/drivers/media/dvb/frontends/sp887x.c b/drivers/media/dvb/frontends/sp887x.c
index 4543609e1816..559509ab4dab 100644
--- a/drivers/media/dvb/frontends/sp887x.c
+++ b/drivers/media/dvb/frontends/sp887x.c
@@ -337,7 +337,8 @@ static int sp887x_setup_frontend_parameters (struct dvb_frontend* fe,
337 struct dvb_frontend_parameters *p) 337 struct dvb_frontend_parameters *p)
338{ 338{
339 struct sp887x_state* state = fe->demodulator_priv; 339 struct sp887x_state* state = fe->demodulator_priv;
340 int actual_freq, err; 340 unsigned actual_freq;
341 int err;
341 u16 val, reg0xc05; 342 u16 val, reg0xc05;
342 343
343 if (p->u.ofdm.bandwidth != BANDWIDTH_8_MHZ && 344 if (p->u.ofdm.bandwidth != BANDWIDTH_8_MHZ &&
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 404108f09d77..c7c770c28988 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -381,9 +381,9 @@ static inline void start_debi_dma(struct av7110 *av7110, int dir,
381 irdebi(av7110, DEBISWAB, addr, 0, len); 381 irdebi(av7110, DEBISWAB, addr, 0, len);
382} 382}
383 383
384static void debiirq(unsigned long data) 384static void debiirq(unsigned long cookie)
385{ 385{
386 struct av7110 *av7110 = (struct av7110 *) data; 386 struct av7110 *av7110 = (struct av7110 *)cookie;
387 int type = av7110->debitype; 387 int type = av7110->debitype;
388 int handle = (type >> 8) & 0x1f; 388 int handle = (type >> 8) & 0x1f;
389 unsigned int xfer = 0; 389 unsigned int xfer = 0;
@@ -492,9 +492,9 @@ debi_done:
492} 492}
493 493
494/* irq from av7110 firmware writing the mailbox register in the DPRAM */ 494/* irq from av7110 firmware writing the mailbox register in the DPRAM */
495static void gpioirq(unsigned long data) 495static void gpioirq(unsigned long cookie)
496{ 496{
497 struct av7110 *av7110 = (struct av7110 *) data; 497 struct av7110 *av7110 = (struct av7110 *)cookie;
498 u32 rxbuf, txbuf; 498 u32 rxbuf, txbuf;
499 int len; 499 int len;
500 500
@@ -1260,9 +1260,9 @@ static int budget_stop_feed(struct dvb_demux_feed *feed)
1260 return status; 1260 return status;
1261} 1261}
1262 1262
1263static void vpeirq(unsigned long data) 1263static void vpeirq(unsigned long cookie)
1264{ 1264{
1265 struct av7110 *budget = (struct av7110 *) data; 1265 struct av7110 *budget = (struct av7110 *)cookie;
1266 u8 *mem = (u8 *) (budget->grabbing); 1266 u8 *mem = (u8 *) (budget->grabbing);
1267 u32 olddma = budget->ttbp; 1267 u32 olddma = budget->ttbp;
1268 u32 newdma = saa7146_read(budget->dev, PCI_VDP3); 1268 u32 newdma = saa7146_read(budget->dev, PCI_VDP3);