aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/b2c2/flexcop-pci.c
diff options
context:
space:
mode:
authorUwe Bugla <uwe.bugla@gmx.de>2009-03-29 07:13:01 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:47 -0400
commit91b94366260fc4d960713c2e76e0fc874ff76992 (patch)
tree2ee05f5097ea007ac43f7a4fe23e77ea5273ee7b /drivers/media/dvb/b2c2/flexcop-pci.c
parent1589a993f074124c3edfff03656e910bb472eeaa (diff)
V4L/DVB (11288): Code cleanup (passes checkpatch now) of the b2c2-flexcop-drivers 2/2
This is the second part of the code cleanup changing the usb and pci-driver cores. Signed-off-by: Uwe Bugla <uwe.bugla@gmx.de> Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/b2c2/flexcop-pci.c')
-rw-r--r--drivers/media/dvb/b2c2/flexcop-pci.c164
1 files changed, 82 insertions, 82 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-pci.c b/drivers/media/dvb/b2c2/flexcop-pci.c
index 84d2252045c8..227c0200b70a 100644
--- a/drivers/media/dvb/b2c2/flexcop-pci.c
+++ b/drivers/media/dvb/b2c2/flexcop-pci.c
@@ -1,9 +1,7 @@
1/* 1/*
2 * This file is part of linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III 2 * Linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III
3 * 3 * flexcop-pci.c - covers the PCI part including DMA transfers
4 * flexcop-pci.c - covers the PCI part including DMA transfers. 4 * see flexcop.c for copyright information
5 *
6 * see flexcop.c for copyright information.
7 */ 5 */
8 6
9#define FC_LOG_PREFIX "flexcop-pci" 7#define FC_LOG_PREFIX "flexcop-pci"
@@ -11,7 +9,8 @@
11 9
12static int enable_pid_filtering = 1; 10static int enable_pid_filtering = 1;
13module_param(enable_pid_filtering, int, 0444); 11module_param(enable_pid_filtering, int, 0444);
14MODULE_PARM_DESC(enable_pid_filtering, "enable hardware pid filtering: supported values: 0 (fullts), 1"); 12MODULE_PARM_DESC(enable_pid_filtering,
13 "enable hardware pid filtering: supported values: 0 (fullts), 1");
15 14
16static int irq_chk_intv = 100; 15static int irq_chk_intv = 100;
17module_param(irq_chk_intv, int, 0644); 16module_param(irq_chk_intv, int, 0644);
@@ -26,17 +25,17 @@ MODULE_PARM_DESC(irq_chk_intv, "set the interval for IRQ streaming watchdog.");
26#define DEBSTATUS " (debugging is not enabled)" 25#define DEBSTATUS " (debugging is not enabled)"
27#endif 26#endif
28 27
29#define deb_info(args...) dprintk(0x01,args) 28#define deb_info(args...) dprintk(0x01, args)
30#define deb_reg(args...) dprintk(0x02,args) 29#define deb_reg(args...) dprintk(0x02, args)
31#define deb_ts(args...) dprintk(0x04,args) 30#define deb_ts(args...) dprintk(0x04, args)
32#define deb_irq(args...) dprintk(0x08,args) 31#define deb_irq(args...) dprintk(0x08, args)
33#define deb_chk(args...) dprintk(0x10,args) 32#define deb_chk(args...) dprintk(0x10, args)
34 33
35static int debug; 34static int debug;
36module_param(debug, int, 0644); 35module_param(debug, int, 0644);
37MODULE_PARM_DESC(debug, 36MODULE_PARM_DESC(debug,
38 "set debug level (1=info,2=regs,4=TS,8=irqdma,16=check (|-able))." 37 "set debug level (1=info,2=regs,4=TS,8=irqdma,16=check (|-able))."
39 DEBSTATUS); 38 DEBSTATUS);
40 39
41#define DRIVER_VERSION "0.1" 40#define DRIVER_VERSION "0.1"
42#define DRIVER_NAME "Technisat/B2C2 FlexCop II/IIb/III Digital TV PCI Driver" 41#define DRIVER_NAME "Technisat/B2C2 FlexCop II/IIb/III Digital TV PCI Driver"
@@ -51,30 +50,30 @@ struct flexcop_pci {
51 50
52 void __iomem *io_mem; 51 void __iomem *io_mem;
53 u32 irq; 52 u32 irq;
54/* buffersize (at least for DMA1, need to be % 188 == 0, 53 /* buffersize (at least for DMA1, need to be % 188 == 0,
55 * this logic is required */ 54 * this logic is required */
56#define FC_DEFAULT_DMA1_BUFSIZE (1280 * 188) 55#define FC_DEFAULT_DMA1_BUFSIZE (1280 * 188)
57#define FC_DEFAULT_DMA2_BUFSIZE (10 * 188) 56#define FC_DEFAULT_DMA2_BUFSIZE (10 * 188)
58 struct flexcop_dma dma[2]; 57 struct flexcop_dma dma[2];
59 58
60 int active_dma1_addr; /* 0 = addr0 of dma1; 1 = addr1 of dma1 */ 59 int active_dma1_addr; /* 0 = addr0 of dma1; 1 = addr1 of dma1 */
61 u32 last_dma1_cur_pos; /* position of the pointer last time the timer/packet irq occured */ 60 u32 last_dma1_cur_pos;
61 /* position of the pointer last time the timer/packet irq occured */
62 int count; 62 int count;
63 int count_prev; 63 int count_prev;
64 int stream_problem; 64 int stream_problem;
65 65
66 spinlock_t irq_lock; 66 spinlock_t irq_lock;
67
68 unsigned long last_irq; 67 unsigned long last_irq;
69 68
70 struct delayed_work irq_check_work; 69 struct delayed_work irq_check_work;
71
72 struct flexcop_device *fc_dev; 70 struct flexcop_device *fc_dev;
73}; 71};
74 72
75static int lastwreg,lastwval,lastrreg,lastrval; 73static int lastwreg, lastwval, lastrreg, lastrval;
76 74
77static flexcop_ibi_value flexcop_pci_read_ibi_reg (struct flexcop_device *fc, flexcop_ibi_register r) 75static flexcop_ibi_value flexcop_pci_read_ibi_reg(struct flexcop_device *fc,
76 flexcop_ibi_register r)
78{ 77{
79 struct flexcop_pci *fc_pci = fc->bus_specific; 78 struct flexcop_pci *fc_pci = fc->bus_specific;
80 flexcop_ibi_value v; 79 flexcop_ibi_value v;
@@ -82,19 +81,20 @@ static flexcop_ibi_value flexcop_pci_read_ibi_reg (struct flexcop_device *fc, fl
82 81
83 if (lastrreg != r || lastrval != v.raw) { 82 if (lastrreg != r || lastrval != v.raw) {
84 lastrreg = r; lastrval = v.raw; 83 lastrreg = r; lastrval = v.raw;
85 deb_reg("new rd: %3x: %08x\n",r,v.raw); 84 deb_reg("new rd: %3x: %08x\n", r, v.raw);
86 } 85 }
87 86
88 return v; 87 return v;
89} 88}
90 89
91static int flexcop_pci_write_ibi_reg(struct flexcop_device *fc, flexcop_ibi_register r, flexcop_ibi_value v) 90static int flexcop_pci_write_ibi_reg(struct flexcop_device *fc,
91 flexcop_ibi_register r, flexcop_ibi_value v)
92{ 92{
93 struct flexcop_pci *fc_pci = fc->bus_specific; 93 struct flexcop_pci *fc_pci = fc->bus_specific;
94 94
95 if (lastwreg != r || lastwval != v.raw) { 95 if (lastwreg != r || lastwval != v.raw) {
96 lastwreg = r; lastwval = v.raw; 96 lastwreg = r; lastwval = v.raw;
97 deb_reg("new wr: %3x: %08x\n",r,v.raw); 97 deb_reg("new wr: %3x: %08x\n", r, v.raw);
98 } 98 }
99 99
100 writel(v.raw, fc_pci->io_mem + r); 100 writel(v.raw, fc_pci->io_mem + r);
@@ -117,12 +117,12 @@ static void flexcop_pci_irq_check_work(struct work_struct *work)
117 117
118 spin_lock_irq(&fc->demux.lock); 118 spin_lock_irq(&fc->demux.lock);
119 list_for_each_entry(feed, &fc->demux.feed_list, 119 list_for_each_entry(feed, &fc->demux.feed_list,
120 list_head) { 120 list_head) {
121 flexcop_pid_feed_control(fc, feed, 0); 121 flexcop_pid_feed_control(fc, feed, 0);
122 } 122 }
123 123
124 list_for_each_entry(feed, &fc->demux.feed_list, 124 list_for_each_entry(feed, &fc->demux.feed_list,
125 list_head) { 125 list_head) {
126 flexcop_pid_feed_control(fc, feed, 1); 126 flexcop_pid_feed_control(fc, feed, 1);
127 } 127 }
128 spin_unlock_irq(&fc->demux.lock); 128 spin_unlock_irq(&fc->demux.lock);
@@ -150,11 +150,10 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id)
150 flexcop_ibi_value v; 150 flexcop_ibi_value v;
151 irqreturn_t ret = IRQ_HANDLED; 151 irqreturn_t ret = IRQ_HANDLED;
152 152
153 spin_lock_irqsave(&fc_pci->irq_lock,flags); 153 spin_lock_irqsave(&fc_pci->irq_lock, flags);
154 154 v = fc->read_ibi_reg(fc, irq_20c);
155 v = fc->read_ibi_reg(fc,irq_20c);
156 155
157 /* errors */ 156 /* errors */
158 if (v.irq_20c.Data_receiver_error) 157 if (v.irq_20c.Data_receiver_error)
159 deb_chk("data receiver error\n"); 158 deb_chk("data receiver error\n");
160 if (v.irq_20c.Continuity_error_flag) 159 if (v.irq_20c.Continuity_error_flag)
@@ -165,24 +164,29 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id)
165 deb_chk("Transport error\n"); 164 deb_chk("Transport error\n");
166 165
167 if ((fc_pci->count % 1000) == 0) 166 if ((fc_pci->count % 1000) == 0)
168 deb_chk("%d valid irq took place so far\n",fc_pci->count); 167 deb_chk("%d valid irq took place so far\n", fc_pci->count);
169 168
170 if (v.irq_20c.DMA1_IRQ_Status == 1) { 169 if (v.irq_20c.DMA1_IRQ_Status == 1) {
171 if (fc_pci->active_dma1_addr == 0) 170 if (fc_pci->active_dma1_addr == 0)
172 flexcop_pass_dmx_packets(fc_pci->fc_dev,fc_pci->dma[0].cpu_addr0,fc_pci->dma[0].size / 188); 171 flexcop_pass_dmx_packets(fc_pci->fc_dev,
172 fc_pci->dma[0].cpu_addr0,
173 fc_pci->dma[0].size / 188);
173 else 174 else
174 flexcop_pass_dmx_packets(fc_pci->fc_dev,fc_pci->dma[0].cpu_addr1,fc_pci->dma[0].size / 188); 175 flexcop_pass_dmx_packets(fc_pci->fc_dev,
176 fc_pci->dma[0].cpu_addr1,
177 fc_pci->dma[0].size / 188);
175 178
176 deb_irq("page change to page: %d\n",!fc_pci->active_dma1_addr); 179 deb_irq("page change to page: %d\n",!fc_pci->active_dma1_addr);
177 fc_pci->active_dma1_addr = !fc_pci->active_dma1_addr; 180 fc_pci->active_dma1_addr = !fc_pci->active_dma1_addr;
178 } else if (v.irq_20c.DMA1_Timer_Status == 1) {
179 /* for the timer IRQ we only can use buffer dmx feeding, because we don't have 181 /* for the timer IRQ we only can use buffer dmx feeding, because we don't have
180 * complete TS packets when reading from the DMA memory */ 182 * complete TS packets when reading from the DMA memory */
183 } else if (v.irq_20c.DMA1_Timer_Status == 1) {
181 dma_addr_t cur_addr = 184 dma_addr_t cur_addr =
182 fc->read_ibi_reg(fc,dma1_008).dma_0x8.dma_cur_addr << 2; 185 fc->read_ibi_reg(fc,dma1_008).dma_0x8.dma_cur_addr << 2;
183 u32 cur_pos = cur_addr - fc_pci->dma[0].dma_addr0; 186 u32 cur_pos = cur_addr - fc_pci->dma[0].dma_addr0;
184 187
185 deb_irq("%u irq: %08x cur_addr: %llx: cur_pos: %08x, last_cur_pos: %08x ", 188 deb_irq("%u irq: %08x cur_addr: %llx: cur_pos: %08x, "
189 "last_cur_pos: %08x ",
186 jiffies_to_usecs(jiffies - fc_pci->last_irq), 190 jiffies_to_usecs(jiffies - fc_pci->last_irq),
187 v.raw, (unsigned long long)cur_addr, cur_pos, 191 v.raw, (unsigned long long)cur_addr, cur_pos,
188 fc_pci->last_dma1_cur_pos); 192 fc_pci->last_dma1_cur_pos);
@@ -192,30 +196,36 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id)
192 * pass the data from last_cur_pos to the buffer end to the demux 196 * pass the data from last_cur_pos to the buffer end to the demux
193 */ 197 */
194 if (cur_pos < fc_pci->last_dma1_cur_pos) { 198 if (cur_pos < fc_pci->last_dma1_cur_pos) {
195 deb_irq(" end was reached: passing %d bytes ",(fc_pci->dma[0].size*2 - 1) - fc_pci->last_dma1_cur_pos); 199 deb_irq(" end was reached: passing %d bytes ",
200 (fc_pci->dma[0].size*2 - 1) -
201 fc_pci->last_dma1_cur_pos);
196 flexcop_pass_dmx_data(fc_pci->fc_dev, 202 flexcop_pass_dmx_data(fc_pci->fc_dev,
197 fc_pci->dma[0].cpu_addr0 + fc_pci->last_dma1_cur_pos, 203 fc_pci->dma[0].cpu_addr0 +
198 (fc_pci->dma[0].size*2) - fc_pci->last_dma1_cur_pos); 204 fc_pci->last_dma1_cur_pos,
205 (fc_pci->dma[0].size*2) -
206 fc_pci->last_dma1_cur_pos);
199 fc_pci->last_dma1_cur_pos = 0; 207 fc_pci->last_dma1_cur_pos = 0;
200 } 208 }
201 209
202 if (cur_pos > fc_pci->last_dma1_cur_pos) { 210 if (cur_pos > fc_pci->last_dma1_cur_pos) {
203 deb_irq(" passing %d bytes ",cur_pos - fc_pci->last_dma1_cur_pos); 211 deb_irq(" passing %d bytes ",
212 cur_pos - fc_pci->last_dma1_cur_pos);
204 flexcop_pass_dmx_data(fc_pci->fc_dev, 213 flexcop_pass_dmx_data(fc_pci->fc_dev,
205 fc_pci->dma[0].cpu_addr0 + fc_pci->last_dma1_cur_pos, 214 fc_pci->dma[0].cpu_addr0 +
206 cur_pos - fc_pci->last_dma1_cur_pos); 215 fc_pci->last_dma1_cur_pos,
216 cur_pos - fc_pci->last_dma1_cur_pos);
207 } 217 }
208 deb_irq("\n"); 218 deb_irq("\n");
209 219
210 fc_pci->last_dma1_cur_pos = cur_pos; 220 fc_pci->last_dma1_cur_pos = cur_pos;
211 fc_pci->count++; 221 fc_pci->count++;
212 } else { 222 } else {
213 deb_irq("isr for flexcop called, apparently without reason (%08x)\n",v.raw); 223 deb_irq("isr for flexcop called, "
224 "apparently without reason (%08x)\n", v.raw);
214 ret = IRQ_NONE; 225 ret = IRQ_NONE;
215 } 226 }
216 227
217 spin_unlock_irqrestore(&fc_pci->irq_lock,flags); 228 spin_unlock_irqrestore(&fc_pci->irq_lock, flags);
218
219 return ret; 229 return ret;
220} 230}
221 231
@@ -223,52 +233,48 @@ static int flexcop_pci_stream_control(struct flexcop_device *fc, int onoff)
223{ 233{
224 struct flexcop_pci *fc_pci = fc->bus_specific; 234 struct flexcop_pci *fc_pci = fc->bus_specific;
225 if (onoff) { 235 if (onoff) {
226 flexcop_dma_config(fc,&fc_pci->dma[0],FC_DMA_1); 236 flexcop_dma_config(fc, &fc_pci->dma[0], FC_DMA_1);
227 flexcop_dma_config(fc,&fc_pci->dma[1],FC_DMA_2); 237 flexcop_dma_config(fc, &fc_pci->dma[1], FC_DMA_2);
228 238 flexcop_dma_config_timer(fc, FC_DMA_1, 0);
229 flexcop_dma_config_timer(fc,FC_DMA_1,0); 239 flexcop_dma_xfer_control(fc, FC_DMA_1,
230 240 FC_DMA_SUBADDR_0 | FC_DMA_SUBADDR_1, 1);
231 flexcop_dma_xfer_control(fc,FC_DMA_1,FC_DMA_SUBADDR_0 | FC_DMA_SUBADDR_1,1);
232 deb_irq("DMA xfer enabled\n"); 241 deb_irq("DMA xfer enabled\n");
233 242
234 fc_pci->last_dma1_cur_pos = 0; 243 fc_pci->last_dma1_cur_pos = 0;
235 flexcop_dma_control_timer_irq(fc,FC_DMA_1,1); 244 flexcop_dma_control_timer_irq(fc, FC_DMA_1, 1);
236 deb_irq("IRQ enabled\n"); 245 deb_irq("IRQ enabled\n");
237
238 fc_pci->count_prev = fc_pci->count; 246 fc_pci->count_prev = fc_pci->count;
239
240// fc_pci->active_dma1_addr = 0;
241// flexcop_dma_control_size_irq(fc,FC_DMA_1,1);
242
243 } else { 247 } else {
244 flexcop_dma_control_timer_irq(fc,FC_DMA_1,0); 248 flexcop_dma_control_timer_irq(fc, FC_DMA_1, 0);
245 deb_irq("IRQ disabled\n"); 249 deb_irq("IRQ disabled\n");
246 250
247// flexcop_dma_control_size_irq(fc,FC_DMA_1,0); 251 flexcop_dma_xfer_control(fc, FC_DMA_1,
248 252 FC_DMA_SUBADDR_0 | FC_DMA_SUBADDR_1, 0);
249 flexcop_dma_xfer_control(fc,FC_DMA_1,FC_DMA_SUBADDR_0 | FC_DMA_SUBADDR_1,0);
250 deb_irq("DMA xfer disabled\n"); 253 deb_irq("DMA xfer disabled\n");
251 } 254 }
252
253 return 0; 255 return 0;
254} 256}
255 257
256static int flexcop_pci_dma_init(struct flexcop_pci *fc_pci) 258static int flexcop_pci_dma_init(struct flexcop_pci *fc_pci)
257{ 259{
258 int ret; 260 int ret;
259 if ((ret = flexcop_dma_allocate(fc_pci->pdev,&fc_pci->dma[0],FC_DEFAULT_DMA1_BUFSIZE)) != 0) 261 ret = flexcop_dma_allocate(fc_pci->pdev, &fc_pci->dma[0],
262 FC_DEFAULT_DMA1_BUFSIZE);
263 if (ret != 0)
260 return ret; 264 return ret;
261 265
262 if ((ret = flexcop_dma_allocate(fc_pci->pdev,&fc_pci->dma[1],FC_DEFAULT_DMA2_BUFSIZE)) != 0) { 266 ret = flexcop_dma_allocate(fc_pci->pdev, &fc_pci->dma[1],
267 FC_DEFAULT_DMA2_BUFSIZE);
268 if (ret != 0) {
263 flexcop_dma_free(&fc_pci->dma[0]); 269 flexcop_dma_free(&fc_pci->dma[0]);
264 return ret; 270 return ret;
265 } 271 }
266 272
267 flexcop_sram_set_dest(fc_pci->fc_dev,FC_SRAM_DEST_MEDIA | FC_SRAM_DEST_NET, FC_SRAM_DEST_TARGET_DMA1); 273 flexcop_sram_set_dest(fc_pci->fc_dev, FC_SRAM_DEST_MEDIA |
268 flexcop_sram_set_dest(fc_pci->fc_dev,FC_SRAM_DEST_CAO | FC_SRAM_DEST_CAI, FC_SRAM_DEST_TARGET_DMA2); 274 FC_SRAM_DEST_NET, FC_SRAM_DEST_TARGET_DMA1);
269 275 flexcop_sram_set_dest(fc_pci->fc_dev, FC_SRAM_DEST_CAO |
276 FC_SRAM_DEST_CAI, FC_SRAM_DEST_TARGET_DMA2);
270 fc_pci->init_state |= FC_PCI_DMA_INIT; 277 fc_pci->init_state |= FC_PCI_DMA_INIT;
271
272 return ret; 278 return ret;
273} 279}
274 280
@@ -291,12 +297,8 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci)
291 297
292 if ((ret = pci_enable_device(fc_pci->pdev)) != 0) 298 if ((ret = pci_enable_device(fc_pci->pdev)) != 0)
293 return ret; 299 return ret;
294
295 pci_set_master(fc_pci->pdev); 300 pci_set_master(fc_pci->pdev);
296 301
297 /* enable interrupts */
298 // pci_write_config_dword(pdev, 0x6c, 0x8000);
299
300 if ((ret = pci_request_regions(fc_pci->pdev, DRIVER_NAME)) != 0) 302 if ((ret = pci_request_regions(fc_pci->pdev, DRIVER_NAME)) != 0)
301 goto err_pci_disable_device; 303 goto err_pci_disable_device;
302 304
@@ -339,8 +341,8 @@ static void flexcop_pci_exit(struct flexcop_pci *fc_pci)
339 fc_pci->init_state &= ~FC_PCI_INIT; 341 fc_pci->init_state &= ~FC_PCI_INIT;
340} 342}
341 343
342 344static int flexcop_pci_probe(struct pci_dev *pdev,
343static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 345 const struct pci_device_id *ent)
344{ 346{
345 struct flexcop_device *fc; 347 struct flexcop_device *fc;
346 struct flexcop_pci *fc_pci; 348 struct flexcop_pci *fc_pci;
@@ -351,7 +353,7 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
351 return -ENOMEM; 353 return -ENOMEM;
352 } 354 }
353 355
354/* general flexcop init */ 356 /* general flexcop init */
355 fc_pci = fc->bus_specific; 357 fc_pci = fc->bus_specific;
356 fc_pci->fc_dev = fc; 358 fc_pci->fc_dev = fc;
357 359
@@ -359,7 +361,6 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
359 fc->write_ibi_reg = flexcop_pci_write_ibi_reg; 361 fc->write_ibi_reg = flexcop_pci_write_ibi_reg;
360 fc->i2c_request = flexcop_i2c_request; 362 fc->i2c_request = flexcop_i2c_request;
361 fc->get_mac_addr = flexcop_eeprom_check_mac_addr; 363 fc->get_mac_addr = flexcop_eeprom_check_mac_addr;
362
363 fc->stream_control = flexcop_pci_stream_control; 364 fc->stream_control = flexcop_pci_stream_control;
364 365
365 if (enable_pid_filtering) 366 if (enable_pid_filtering)
@@ -369,29 +370,29 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
369 370
370 fc->pid_filtering = enable_pid_filtering; 371 fc->pid_filtering = enable_pid_filtering;
371 fc->bus_type = FC_PCI; 372 fc->bus_type = FC_PCI;
372
373 fc->dev = &pdev->dev; 373 fc->dev = &pdev->dev;
374 fc->owner = THIS_MODULE; 374 fc->owner = THIS_MODULE;
375 375
376/* bus specific part */ 376 /* bus specific part */
377 fc_pci->pdev = pdev; 377 fc_pci->pdev = pdev;
378 if ((ret = flexcop_pci_init(fc_pci)) != 0) 378 if ((ret = flexcop_pci_init(fc_pci)) != 0)
379 goto err_kfree; 379 goto err_kfree;
380 380
381/* init flexcop */ 381 /* init flexcop */
382 if ((ret = flexcop_device_initialize(fc)) != 0) 382 if ((ret = flexcop_device_initialize(fc)) != 0)
383 goto err_pci_exit; 383 goto err_pci_exit;
384 384
385/* init dma */ 385 /* init dma */
386 if ((ret = flexcop_pci_dma_init(fc_pci)) != 0) 386 if ((ret = flexcop_pci_dma_init(fc_pci)) != 0)
387 goto err_fc_exit; 387 goto err_fc_exit;
388 388
389 INIT_DELAYED_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work); 389 INIT_DELAYED_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work);
390 390
391 if (irq_chk_intv > 0) 391 if (irq_chk_intv > 0)
392 schedule_delayed_work(&fc_pci->irq_check_work, 392 schedule_delayed_work(&fc_pci->irq_check_work,
393 msecs_to_jiffies(irq_chk_intv < 100 ? 100 : irq_chk_intv)); 393 msecs_to_jiffies(irq_chk_intv < 100 ?
394 394 100 :
395 irq_chk_intv));
395 return ret; 396 return ret;
396 397
397err_fc_exit: 398err_fc_exit:
@@ -421,7 +422,6 @@ static void flexcop_pci_remove(struct pci_dev *pdev)
421 422
422static struct pci_device_id flexcop_pci_tbl[] = { 423static struct pci_device_id flexcop_pci_tbl[] = {
423 { PCI_DEVICE(0x13d0, 0x2103) }, 424 { PCI_DEVICE(0x13d0, 0x2103) },
424/* { PCI_DEVICE(0x13d0, 0x2200) }, ? */
425 { }, 425 { },
426}; 426};
427 427