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 /drivers/media/dvb/b2c2 | |
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>
Diffstat (limited to 'drivers/media/dvb/b2c2')
-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 |
4 files changed, 3 insertions, 44 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" |