diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-01-23 14:11:09 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-23 14:11:09 -0500 |
commit | 703cb2cbf4250215e67f4a04081e4ea9d9f34bc9 (patch) | |
tree | cd9a9404a0cda282013c34ea087611771fc2e6ff | |
parent | 8a4b275f9c192921797f45c2d4b5e4bc3875500a (diff) |
V4L/DVB (3428): drivers/media/dvb/ possible cleanups
- Make needlessly global code static
- #if 0 the following unused global functions:
- b2c2/flexcop-dma.c: flexcop_dma_control_packet_irq()
- b2c2/flexcop-dma.c: flexcop_dma_config_packet_count()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-common.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-dma.c | 35 | ||||
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-misc.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-reg.h | 4 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/cxusb.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-firmware.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb.h | 1 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/vp702x.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/vp702x.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_ir.c | 26 |
11 files changed, 29 insertions, 71 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-common.h b/drivers/media/dvb/b2c2/flexcop-common.h index 344a3c898460..7d7e1613c5a7 100644 --- a/drivers/media/dvb/b2c2/flexcop-common.h +++ b/drivers/media/dvb/b2c2/flexcop-common.h | |||
@@ -116,11 +116,9 @@ void flexcop_dma_free(struct flexcop_dma *dma); | |||
116 | 116 | ||
117 | int flexcop_dma_control_timer_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff); | 117 | int flexcop_dma_control_timer_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff); |
118 | int flexcop_dma_control_size_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff); | 118 | int flexcop_dma_control_size_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff); |
119 | int flexcop_dma_control_packet_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff); | ||
120 | int flexcop_dma_config(struct flexcop_device *fc, struct flexcop_dma *dma, flexcop_dma_index_t dma_idx); | 119 | int flexcop_dma_config(struct flexcop_device *fc, struct flexcop_dma *dma, flexcop_dma_index_t dma_idx); |
121 | int flexcop_dma_xfer_control(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, flexcop_dma_addr_index_t index, int onoff); | 120 | int flexcop_dma_xfer_control(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, flexcop_dma_addr_index_t index, int onoff); |
122 | int flexcop_dma_config_timer(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 cycles); | 121 | int flexcop_dma_config_timer(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 cycles); |
123 | int flexcop_dma_config_packet_count(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 packets); | ||
124 | 122 | ||
125 | /* from flexcop-eeprom.c */ | 123 | /* from flexcop-eeprom.c */ |
126 | /* the PCI part uses this call to get the MAC address, the USB part has its own */ | 124 | /* the PCI part uses this call to get the MAC address, the USB part has its own */ |
diff --git a/drivers/media/dvb/b2c2/flexcop-dma.c b/drivers/media/dvb/b2c2/flexcop-dma.c index cf4ed1df6086..6f592bc32d22 100644 --- a/drivers/media/dvb/b2c2/flexcop-dma.c +++ b/drivers/media/dvb/b2c2/flexcop-dma.c | |||
@@ -169,38 +169,3 @@ int flexcop_dma_config_timer(struct flexcop_device *fc, | |||
169 | } | 169 | } |
170 | EXPORT_SYMBOL(flexcop_dma_config_timer); | 170 | EXPORT_SYMBOL(flexcop_dma_config_timer); |
171 | 171 | ||
172 | /* packet IRQ does not exist in FCII or FCIIb - according to data book and tests */ | ||
173 | int flexcop_dma_control_packet_irq(struct flexcop_device *fc, | ||
174 | flexcop_dma_index_t no, | ||
175 | int onoff) | ||
176 | { | ||
177 | flexcop_ibi_value v = fc->read_ibi_reg(fc,ctrl_208); | ||
178 | |||
179 | deb_rdump("reg: %03x: %x\n",ctrl_208,v.raw); | ||
180 | if (no & FC_DMA_1) | ||
181 | v.ctrl_208.DMA1_Size_IRQ_Enable_sig = onoff; | ||
182 | |||
183 | if (no & FC_DMA_2) | ||
184 | v.ctrl_208.DMA2_Size_IRQ_Enable_sig = onoff; | ||
185 | |||
186 | fc->write_ibi_reg(fc,ctrl_208,v); | ||
187 | deb_rdump("reg: %03x: %x\n",ctrl_208,v.raw); | ||
188 | |||
189 | return 0; | ||
190 | } | ||
191 | EXPORT_SYMBOL(flexcop_dma_control_packet_irq); | ||
192 | |||
193 | int flexcop_dma_config_packet_count(struct flexcop_device *fc, | ||
194 | flexcop_dma_index_t dma_idx, | ||
195 | u8 packets) | ||
196 | { | ||
197 | flexcop_ibi_register r = (dma_idx & FC_DMA_1) ? dma1_004 : dma2_014; | ||
198 | flexcop_ibi_value v = fc->read_ibi_reg(fc,r); | ||
199 | |||
200 | flexcop_dma_remap(fc,dma_idx,1); | ||
201 | |||
202 | v.dma_0x4_remap.DMA_maxpackets = packets; | ||
203 | fc->write_ibi_reg(fc,r,v); | ||
204 | return 0; | ||
205 | } | ||
206 | EXPORT_SYMBOL(flexcop_dma_config_packet_count); | ||
diff --git a/drivers/media/dvb/b2c2/flexcop-misc.c b/drivers/media/dvb/b2c2/flexcop-misc.c index 62282d8dbfa8..167583bf0621 100644 --- a/drivers/media/dvb/b2c2/flexcop-misc.c +++ b/drivers/media/dvb/b2c2/flexcop-misc.c | |||
@@ -36,14 +36,14 @@ void flexcop_determine_revision(struct flexcop_device *fc) | |||
36 | /* bus parts have to decide if hw pid filtering is used or not. */ | 36 | /* bus parts have to decide if hw pid filtering is used or not. */ |
37 | } | 37 | } |
38 | 38 | ||
39 | const char *flexcop_revision_names[] = { | 39 | static const char *flexcop_revision_names[] = { |
40 | "Unkown chip", | 40 | "Unkown chip", |
41 | "FlexCopII", | 41 | "FlexCopII", |
42 | "FlexCopIIb", | 42 | "FlexCopIIb", |
43 | "FlexCopIII", | 43 | "FlexCopIII", |
44 | }; | 44 | }; |
45 | 45 | ||
46 | const char *flexcop_device_names[] = { | 46 | static const char *flexcop_device_names[] = { |
47 | "Unkown device", | 47 | "Unkown device", |
48 | "Air2PC/AirStar 2 DVB-T", | 48 | "Air2PC/AirStar 2 DVB-T", |
49 | "Air2PC/AirStar 2 ATSC 1st generation", | 49 | "Air2PC/AirStar 2 ATSC 1st generation", |
@@ -54,7 +54,7 @@ const char *flexcop_device_names[] = { | |||
54 | "Air2PC/AirStar 2 ATSC 3rd generation (HD5000)", | 54 | "Air2PC/AirStar 2 ATSC 3rd generation (HD5000)", |
55 | }; | 55 | }; |
56 | 56 | ||
57 | const char *flexcop_bus_names[] = { | 57 | static const char *flexcop_bus_names[] = { |
58 | "USB", | 58 | "USB", |
59 | "PCI", | 59 | "PCI", |
60 | }; | 60 | }; |
diff --git a/drivers/media/dvb/b2c2/flexcop-reg.h b/drivers/media/dvb/b2c2/flexcop-reg.h index 3153f9513c63..491f9bd6e195 100644 --- a/drivers/media/dvb/b2c2/flexcop-reg.h +++ b/drivers/media/dvb/b2c2/flexcop-reg.h | |||
@@ -16,8 +16,6 @@ typedef enum { | |||
16 | FLEXCOP_III, | 16 | FLEXCOP_III, |
17 | } flexcop_revision_t; | 17 | } flexcop_revision_t; |
18 | 18 | ||
19 | extern const char *flexcop_revision_names[]; | ||
20 | |||
21 | typedef enum { | 19 | typedef enum { |
22 | FC_UNK = 0, | 20 | FC_UNK = 0, |
23 | FC_AIR_DVB, | 21 | FC_AIR_DVB, |
@@ -34,8 +32,6 @@ typedef enum { | |||
34 | FC_PCI, | 32 | FC_PCI, |
35 | } flexcop_bus_t; | 33 | } flexcop_bus_t; |
36 | 34 | ||
37 | extern const char *flexcop_device_names[]; | ||
38 | |||
39 | /* FlexCop IBI Registers */ | 35 | /* FlexCop IBI Registers */ |
40 | #if defined(__LITTLE_ENDIAN) | 36 | #if defined(__LITTLE_ENDIAN) |
41 | #include "flexcop_ibi_value_le.h" | 37 | #include "flexcop_ibi_value_le.h" |
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index a7fb06f4cd34..f14003736afe 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c | |||
@@ -184,7 +184,7 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
184 | return 0; | 184 | return 0; |
185 | } | 185 | } |
186 | 186 | ||
187 | struct dvb_usb_rc_key dvico_mce_rc_keys[] = { | 187 | static struct dvb_usb_rc_key dvico_mce_rc_keys[] = { |
188 | { 0xfe, 0x02, KEY_TV }, | 188 | { 0xfe, 0x02, KEY_TV }, |
189 | { 0xfe, 0x0e, KEY_MP3 }, | 189 | { 0xfe, 0x0e, KEY_MP3 }, |
190 | { 0xfe, 0x1a, KEY_DVD }, | 190 | { 0xfe, 0x1a, KEY_DVD }, |
@@ -273,7 +273,7 @@ static int cxusb_mt352_demod_init(struct dvb_frontend* fe) | |||
273 | return 0; | 273 | return 0; |
274 | } | 274 | } |
275 | 275 | ||
276 | struct cx22702_config cxusb_cx22702_config = { | 276 | static struct cx22702_config cxusb_cx22702_config = { |
277 | .demod_address = 0x63, | 277 | .demod_address = 0x63, |
278 | 278 | ||
279 | .output_mode = CX22702_PARALLEL_OUTPUT, | 279 | .output_mode = CX22702_PARALLEL_OUTPUT, |
@@ -282,13 +282,13 @@ struct cx22702_config cxusb_cx22702_config = { | |||
282 | .pll_set = dvb_usb_pll_set_i2c, | 282 | .pll_set = dvb_usb_pll_set_i2c, |
283 | }; | 283 | }; |
284 | 284 | ||
285 | struct lgdt330x_config cxusb_lgdt330x_config = { | 285 | static struct lgdt330x_config cxusb_lgdt330x_config = { |
286 | .demod_address = 0x0e, | 286 | .demod_address = 0x0e, |
287 | .demod_chip = LGDT3303, | 287 | .demod_chip = LGDT3303, |
288 | .pll_set = dvb_usb_pll_set_i2c, | 288 | .pll_set = dvb_usb_pll_set_i2c, |
289 | }; | 289 | }; |
290 | 290 | ||
291 | struct mt352_config cxusb_dee1601_config = { | 291 | static struct mt352_config cxusb_dee1601_config = { |
292 | .demod_address = 0x0f, | 292 | .demod_address = 0x0f, |
293 | .demod_init = cxusb_dee1601_demod_init, | 293 | .demod_init = cxusb_dee1601_demod_init, |
294 | .pll_set = dvb_usb_pll_set, | 294 | .pll_set = dvb_usb_pll_set, |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c index 8535895819fb..9222b0a81f74 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c | |||
@@ -24,6 +24,9 @@ static struct usb_cypress_controller cypress[] = { | |||
24 | { .id = CYPRESS_FX2, .name = "Cypress FX2", .cpu_cs_register = 0xe600 }, | 24 | { .id = CYPRESS_FX2, .name = "Cypress FX2", .cpu_cs_register = 0xe600 }, |
25 | }; | 25 | }; |
26 | 26 | ||
27 | static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, | ||
28 | int *pos); | ||
29 | |||
27 | /* | 30 | /* |
28 | * load a firmware packet to the device | 31 | * load a firmware packet to the device |
29 | */ | 32 | */ |
@@ -112,7 +115,8 @@ int dvb_usb_download_firmware(struct usb_device *udev, struct dvb_usb_properties | |||
112 | return ret; | 115 | return ret; |
113 | } | 116 | } |
114 | 117 | ||
115 | int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, int *pos) | 118 | static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, |
119 | int *pos) | ||
116 | { | 120 | { |
117 | u8 *b = (u8 *) &fw->data[*pos]; | 121 | u8 *b = (u8 *) &fw->data[*pos]; |
118 | int data_offs = 4; | 122 | int data_offs = 4; |
@@ -142,5 +146,3 @@ int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, int *pos) | |||
142 | 146 | ||
143 | return *pos; | 147 | return *pos; |
144 | } | 148 | } |
145 | EXPORT_SYMBOL(dvb_usb_get_hexline); | ||
146 | |||
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index dd568396e594..5e5d21ad93c9 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h | |||
@@ -341,7 +341,6 @@ struct hexline { | |||
341 | u8 data[255]; | 341 | u8 data[255]; |
342 | u8 chk; | 342 | u8 chk; |
343 | }; | 343 | }; |
344 | extern int dvb_usb_get_hexline(const struct firmware *, struct hexline *, int *); | ||
345 | extern int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type); | 344 | extern int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type); |
346 | 345 | ||
347 | #endif | 346 | #endif |
diff --git a/drivers/media/dvb/dvb-usb/vp702x.c b/drivers/media/dvb/dvb-usb/vp702x.c index afa00fdb5ec0..4a95eca81c5c 100644 --- a/drivers/media/dvb/dvb-usb/vp702x.c +++ b/drivers/media/dvb/dvb-usb/vp702x.c | |||
@@ -53,7 +53,8 @@ int vp702x_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 | |||
53 | return ret; | 53 | return ret; |
54 | } | 54 | } |
55 | 55 | ||
56 | int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen) | 56 | static int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, |
57 | u16 index, u8 *b, int blen) | ||
57 | { | 58 | { |
58 | deb_xfer("out: req. %x, val: %x, ind: %x, buffer: ",req,value,index); | 59 | deb_xfer("out: req. %x, val: %x, ind: %x, buffer: ",req,value,index); |
59 | debug_dump(b,blen,deb_xfer); | 60 | debug_dump(b,blen,deb_xfer); |
@@ -88,7 +89,8 @@ unlock: | |||
88 | return ret; | 89 | return ret; |
89 | } | 90 | } |
90 | 91 | ||
91 | int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o, int olen, u8 *i, int ilen, int msec) | 92 | static int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o, |
93 | int olen, u8 *i, int ilen, int msec) | ||
92 | { | 94 | { |
93 | u8 bout[olen+2]; | 95 | u8 bout[olen+2]; |
94 | u8 bin[ilen+1]; | 96 | u8 bin[ilen+1]; |
diff --git a/drivers/media/dvb/dvb-usb/vp702x.h b/drivers/media/dvb/dvb-usb/vp702x.h index a808d48e7bf2..c2f97f96c21f 100644 --- a/drivers/media/dvb/dvb-usb/vp702x.h +++ b/drivers/media/dvb/dvb-usb/vp702x.h | |||
@@ -101,8 +101,6 @@ extern int dvb_usb_vp702x_debug; | |||
101 | extern struct dvb_frontend * vp702x_fe_attach(struct dvb_usb_device *d); | 101 | extern struct dvb_frontend * vp702x_fe_attach(struct dvb_usb_device *d); |
102 | 102 | ||
103 | extern int vp702x_usb_inout_op(struct dvb_usb_device *d, u8 *o, int olen, u8 *i, int ilen, int msec); | 103 | extern int vp702x_usb_inout_op(struct dvb_usb_device *d, u8 *o, int olen, u8 *i, int ilen, int msec); |
104 | extern int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o, int olen, u8 *i, int ilen, int msec); | ||
105 | extern int vp702x_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen); | 104 | extern int vp702x_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen); |
106 | extern int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen); | ||
107 | 105 | ||
108 | #endif | 106 | #endif |
diff --git a/drivers/media/dvb/ttpci/av7110.h b/drivers/media/dvb/ttpci/av7110.h index 6ea30df2e823..fafd25fab835 100644 --- a/drivers/media/dvb/ttpci/av7110.h +++ b/drivers/media/dvb/ttpci/av7110.h | |||
@@ -273,8 +273,6 @@ struct av7110 { | |||
273 | extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, | 273 | extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, |
274 | u16 subpid, u16 pcrpid); | 274 | u16 subpid, u16 pcrpid); |
275 | 275 | ||
276 | extern int av7110_setup_irc_config (struct av7110 *av7110, u32 ir_config); | ||
277 | |||
278 | extern int av7110_ir_init(struct av7110 *av7110); | 276 | extern int av7110_ir_init(struct av7110 *av7110); |
279 | extern void av7110_ir_exit(struct av7110 *av7110); | 277 | extern void av7110_ir_exit(struct av7110 *av7110); |
280 | 278 | ||
diff --git a/drivers/media/dvb/ttpci/av7110_ir.c b/drivers/media/dvb/ttpci/av7110_ir.c index 9138132ad25f..617e4f6c0ed7 100644 --- a/drivers/media/dvb/ttpci/av7110_ir.c +++ b/drivers/media/dvb/ttpci/av7110_ir.c | |||
@@ -155,6 +155,19 @@ static void input_repeat_key(unsigned long data) | |||
155 | } | 155 | } |
156 | 156 | ||
157 | 157 | ||
158 | static int av7110_setup_irc_config(struct av7110 *av7110, u32 ir_config) | ||
159 | { | ||
160 | int ret = 0; | ||
161 | |||
162 | dprintk(4, "%p\n", av7110); | ||
163 | if (av7110) { | ||
164 | ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, ir_config); | ||
165 | av7110->ir_config = ir_config; | ||
166 | } | ||
167 | return ret; | ||
168 | } | ||
169 | |||
170 | |||
158 | static int av7110_ir_write_proc(struct file *file, const char __user *buffer, | 171 | static int av7110_ir_write_proc(struct file *file, const char __user *buffer, |
159 | unsigned long count, void *data) | 172 | unsigned long count, void *data) |
160 | { | 173 | { |
@@ -187,19 +200,6 @@ static int av7110_ir_write_proc(struct file *file, const char __user *buffer, | |||
187 | } | 200 | } |
188 | 201 | ||
189 | 202 | ||
190 | int av7110_setup_irc_config(struct av7110 *av7110, u32 ir_config) | ||
191 | { | ||
192 | int ret = 0; | ||
193 | |||
194 | dprintk(4, "%p\n", av7110); | ||
195 | if (av7110) { | ||
196 | ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, ir_config); | ||
197 | av7110->ir_config = ir_config; | ||
198 | } | ||
199 | return ret; | ||
200 | } | ||
201 | |||
202 | |||
203 | static void ir_handler(struct av7110 *av7110, u32 ircom) | 203 | static void ir_handler(struct av7110 *av7110, u32 ircom) |
204 | { | 204 | { |
205 | dprintk(4, "ircommand = %08x\n", ircom); | 205 | dprintk(4, "ircommand = %08x\n", ircom); |