cx88-dvb.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  1. /*
  2. *
  3. * device driver for Conexant 2388x based TV cards
  4. * MPEG Transport Stream (DVB) routines
  5. *
  6. * (c) 2004 Chris Pascoe <c.pascoe@itee.uq.edu.au>
  7. * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. */
  23. #include <linux/module.h>
  24. #include <linux/init.h>
  25. #include <linux/device.h>
  26. #include <linux/fs.h>
  27. #include <linux/kthread.h>
  28. #include <linux/file.h>
  29. #include <linux/suspend.h>
  30. #include "cx88.h"
  31. #include "dvb-pll.h"
  32. #ifdef HAVE_MT352
  33. # include "mt352.h"
  34. # include "mt352_priv.h"
  35. #endif
  36. #ifdef HAVE_CX22702
  37. # include "cx22702.h"
  38. #endif
  39. #ifdef HAVE_OR51132
  40. # include "or51132.h"
  41. #endif
  42. #ifdef HAVE_LGDT330X
  43. # include "lgdt330x.h"
  44. #endif
  45. #ifdef HAVE_NXT200X
  46. # include "nxt200x.h"
  47. #endif
  48. #ifdef HAVE_CX24123
  49. # include "cx24123.h"
  50. #endif
  51. MODULE_DESCRIPTION("driver for cx2388x based DVB cards");
  52. MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>");
  53. MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
  54. MODULE_LICENSE("GPL");
  55. static unsigned int debug = 0;
  56. module_param(debug, int, 0644);
  57. MODULE_PARM_DESC(debug,"enable debug messages [dvb]");
  58. #define dprintk(level,fmt, arg...) if (debug >= level) \
  59. printk(KERN_DEBUG "%s/2-dvb: " fmt, dev->core->name , ## arg)
  60. /* ------------------------------------------------------------------ */
  61. static int dvb_buf_setup(struct videobuf_queue *q,
  62. unsigned int *count, unsigned int *size)
  63. {
  64. struct cx8802_dev *dev = q->priv_data;
  65. dev->ts_packet_size = 188 * 4;
  66. dev->ts_packet_count = 32;
  67. *size = dev->ts_packet_size * dev->ts_packet_count;
  68. *count = 32;
  69. return 0;
  70. }
  71. static int dvb_buf_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
  72. enum v4l2_field field)
  73. {
  74. struct cx8802_dev *dev = q->priv_data;
  75. return cx8802_buf_prepare(dev, (struct cx88_buffer*)vb,field);
  76. }
  77. static void dvb_buf_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
  78. {
  79. struct cx8802_dev *dev = q->priv_data;
  80. cx8802_buf_queue(dev, (struct cx88_buffer*)vb);
  81. }
  82. static void dvb_buf_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
  83. {
  84. struct cx8802_dev *dev = q->priv_data;
  85. cx88_free_buffer(dev->pci, (struct cx88_buffer*)vb);
  86. }
  87. static struct videobuf_queue_ops dvb_qops = {
  88. .buf_setup = dvb_buf_setup,
  89. .buf_prepare = dvb_buf_prepare,
  90. .buf_queue = dvb_buf_queue,
  91. .buf_release = dvb_buf_release,
  92. };
  93. /* ------------------------------------------------------------------ */
  94. #ifdef HAVE_MT352
  95. static int dvico_fusionhdtv_demod_init(struct dvb_frontend* fe)
  96. {
  97. static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x39 };
  98. static u8 reset [] = { RESET, 0x80 };
  99. static u8 adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 };
  100. static u8 agc_cfg [] = { AGC_TARGET, 0x24, 0x20 };
  101. static u8 gpp_ctl_cfg [] = { GPP_CTL, 0x33 };
  102. static u8 capt_range_cfg[] = { CAPT_RANGE, 0x32 };
  103. mt352_write(fe, clock_config, sizeof(clock_config));
  104. udelay(200);
  105. mt352_write(fe, reset, sizeof(reset));
  106. mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg));
  107. mt352_write(fe, agc_cfg, sizeof(agc_cfg));
  108. mt352_write(fe, gpp_ctl_cfg, sizeof(gpp_ctl_cfg));
  109. mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg));
  110. return 0;
  111. }
  112. static int dntv_live_dvbt_demod_init(struct dvb_frontend* fe)
  113. {
  114. static u8 clock_config [] = { 0x89, 0x38, 0x39 };
  115. static u8 reset [] = { 0x50, 0x80 };
  116. static u8 adc_ctl_1_cfg [] = { 0x8E, 0x40 };
  117. static u8 agc_cfg [] = { 0x67, 0x10, 0x23, 0x00, 0xFF, 0xFF,
  118. 0x00, 0xFF, 0x00, 0x40, 0x40 };
  119. static u8 dntv_extra[] = { 0xB5, 0x7A };
  120. static u8 capt_range_cfg[] = { 0x75, 0x32 };
  121. mt352_write(fe, clock_config, sizeof(clock_config));
  122. udelay(2000);
  123. mt352_write(fe, reset, sizeof(reset));
  124. mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg));
  125. mt352_write(fe, agc_cfg, sizeof(agc_cfg));
  126. udelay(2000);
  127. mt352_write(fe, dntv_extra, sizeof(dntv_extra));
  128. mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg));
  129. return 0;
  130. }
  131. static int mt352_pll_set(struct dvb_frontend* fe,
  132. struct dvb_frontend_parameters* params,
  133. u8* pllbuf)
  134. {
  135. struct cx8802_dev *dev= fe->dvb->priv;
  136. pllbuf[0] = dev->core->pll_addr << 1;
  137. dvb_pll_configure(dev->core->pll_desc, pllbuf+1,
  138. params->frequency,
  139. params->u.ofdm.bandwidth);
  140. return 0;
  141. }
  142. static struct mt352_config dvico_fusionhdtv = {
  143. .demod_address = 0x0F,
  144. .demod_init = dvico_fusionhdtv_demod_init,
  145. .pll_set = mt352_pll_set,
  146. };
  147. static struct mt352_config dntv_live_dvbt_config = {
  148. .demod_address = 0x0f,
  149. .demod_init = dntv_live_dvbt_demod_init,
  150. .pll_set = mt352_pll_set,
  151. };
  152. #endif
  153. #ifdef HAVE_CX22702
  154. static struct cx22702_config connexant_refboard_config = {
  155. .demod_address = 0x43,
  156. .output_mode = CX22702_SERIAL_OUTPUT,
  157. .pll_address = 0x60,
  158. .pll_desc = &dvb_pll_thomson_dtt7579,
  159. };
  160. static struct cx22702_config hauppauge_novat_config = {
  161. .demod_address = 0x43,
  162. .output_mode = CX22702_SERIAL_OUTPUT,
  163. .pll_address = 0x61,
  164. .pll_desc = &dvb_pll_thomson_dtt759x,
  165. };
  166. #endif
  167. #ifdef HAVE_OR51132
  168. static int or51132_set_ts_param(struct dvb_frontend* fe,
  169. int is_punctured)
  170. {
  171. struct cx8802_dev *dev= fe->dvb->priv;
  172. dev->ts_gen_cntrl = is_punctured ? 0x04 : 0x00;
  173. return 0;
  174. }
  175. static struct or51132_config pchdtv_hd3000 = {
  176. .demod_address = 0x15,
  177. .pll_address = 0x61,
  178. .pll_desc = &dvb_pll_thomson_dtt7610,
  179. .set_ts_params = or51132_set_ts_param,
  180. };
  181. #endif
  182. #ifdef HAVE_LGDT330X
  183. static int lgdt330x_pll_set(struct dvb_frontend* fe,
  184. struct dvb_frontend_parameters* params)
  185. {
  186. /* FIXME make this routine use the tuner-simple code.
  187. * It could probably be shared with a number of ATSC
  188. * frontends. Many share the same tuner with analog TV. */
  189. struct cx8802_dev *dev= fe->dvb->priv;
  190. struct cx88_core *core = dev->core;
  191. u8 buf[4];
  192. struct i2c_msg msg =
  193. { .addr = dev->core->pll_addr, .flags = 0, .buf = buf, .len = 4 };
  194. int err;
  195. /* Put the analog decoder in standby to keep it quiet */
  196. cx88_call_i2c_clients (dev->core, TUNER_SET_STANDBY, NULL);
  197. dvb_pll_configure(core->pll_desc, buf, params->frequency, 0);
  198. dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n",
  199. __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]);
  200. if ((err = i2c_transfer(&core->i2c_adap, &msg, 1)) != 1) {
  201. printk(KERN_WARNING "cx88-dvb: %s error "
  202. "(addr %02x <- %02x, err = %i)\n",
  203. __FUNCTION__, buf[0], buf[1], err);
  204. if (err < 0)
  205. return err;
  206. else
  207. return -EREMOTEIO;
  208. }
  209. if (core->tuner_type == TUNER_LG_TDVS_H062F) {
  210. /* Set the Auxiliary Byte. */
  211. buf[2] &= ~0x20;
  212. buf[2] |= 0x18;
  213. buf[3] = 0x50;
  214. i2c_transfer(&core->i2c_adap, &msg, 1);
  215. }
  216. return 0;
  217. }
  218. static int lgdt330x_pll_rf_set(struct dvb_frontend* fe, int index)
  219. {
  220. struct cx8802_dev *dev= fe->dvb->priv;
  221. struct cx88_core *core = dev->core;
  222. dprintk(1, "%s: index = %d\n", __FUNCTION__, index);
  223. if (index == 0)
  224. cx_clear(MO_GP0_IO, 8);
  225. else
  226. cx_set(MO_GP0_IO, 8);
  227. return 0;
  228. }
  229. static int lgdt330x_set_ts_param(struct dvb_frontend* fe, int is_punctured)
  230. {
  231. struct cx8802_dev *dev= fe->dvb->priv;
  232. if (is_punctured)
  233. dev->ts_gen_cntrl |= 0x04;
  234. else
  235. dev->ts_gen_cntrl &= ~0x04;
  236. return 0;
  237. }
  238. static struct lgdt330x_config fusionhdtv_3_gold = {
  239. .demod_address = 0x0e,
  240. .demod_chip = LGDT3302,
  241. .serial_mpeg = 0x04, /* TPSERIAL for 3302 in TOP_CONTROL */
  242. .pll_set = lgdt330x_pll_set,
  243. .set_ts_params = lgdt330x_set_ts_param,
  244. };
  245. static struct lgdt330x_config fusionhdtv_5_gold = {
  246. .demod_address = 0x0e,
  247. .demod_chip = LGDT3303,
  248. .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */
  249. .pll_set = lgdt330x_pll_set,
  250. .set_ts_params = lgdt330x_set_ts_param,
  251. };
  252. #endif
  253. #ifdef HAVE_NXT200X
  254. static int nxt200x_set_ts_param(struct dvb_frontend* fe,
  255. int is_punctured)
  256. {
  257. struct cx8802_dev *dev= fe->dvb->priv;
  258. dev->ts_gen_cntrl = is_punctured ? 0x04 : 0x00;
  259. return 0;
  260. }
  261. static int nxt200x_set_pll_input(u8* buf, int input)
  262. {
  263. if (input)
  264. buf[3] |= 0x08;
  265. else
  266. buf[3] &= ~0x08;
  267. return 0;
  268. }
  269. static struct nxt200x_config ati_hdtvwonder = {
  270. .demod_address = 0x0a,
  271. .pll_address = 0x61,
  272. .pll_desc = &dvb_pll_tuv1236d,
  273. .set_pll_input = nxt200x_set_pll_input,
  274. .set_ts_params = nxt200x_set_ts_param,
  275. };
  276. #endif
  277. #ifdef HAVE_CX24123
  278. static int cx24123_set_ts_param(struct dvb_frontend* fe,
  279. int is_punctured)
  280. {
  281. struct cx8802_dev *dev= fe->dvb->priv;
  282. dev->ts_gen_cntrl = 0x2;
  283. return 0;
  284. }
  285. static struct cx24123_config hauppauge_novas_config = {
  286. .demod_address = 0x55,
  287. .set_ts_params = cx24123_set_ts_param,
  288. };
  289. #endif
  290. static int dvb_register(struct cx8802_dev *dev)
  291. {
  292. /* init struct videobuf_dvb */
  293. dev->dvb.name = dev->core->name;
  294. dev->ts_gen_cntrl = 0x0c;
  295. /* init frontend */
  296. switch (dev->core->board) {
  297. #ifdef HAVE_CX22702
  298. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  299. dev->dvb.frontend = cx22702_attach(&hauppauge_novat_config,
  300. &dev->core->i2c_adap);
  301. break;
  302. case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1:
  303. case CX88_BOARD_CONEXANT_DVB_T1:
  304. case CX88_BOARD_WINFAST_DTV1000:
  305. dev->dvb.frontend = cx22702_attach(&connexant_refboard_config,
  306. &dev->core->i2c_adap);
  307. break;
  308. #endif
  309. #ifdef HAVE_MT352
  310. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
  311. dev->core->pll_addr = 0x61;
  312. dev->core->pll_desc = &dvb_pll_lg_z201;
  313. dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv,
  314. &dev->core->i2c_adap);
  315. break;
  316. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
  317. dev->core->pll_addr = 0x60;
  318. dev->core->pll_desc = &dvb_pll_thomson_dtt7579;
  319. dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv,
  320. &dev->core->i2c_adap);
  321. break;
  322. case CX88_BOARD_KWORLD_DVB_T:
  323. case CX88_BOARD_DNTV_LIVE_DVB_T:
  324. case CX88_BOARD_ADSTECH_DVB_T_PCI:
  325. dev->core->pll_addr = 0x61;
  326. dev->core->pll_desc = &dvb_pll_unknown_1;
  327. dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_config,
  328. &dev->core->i2c_adap);
  329. break;
  330. #endif
  331. #ifdef HAVE_OR51132
  332. case CX88_BOARD_PCHDTV_HD3000:
  333. dev->dvb.frontend = or51132_attach(&pchdtv_hd3000,
  334. &dev->core->i2c_adap);
  335. break;
  336. #endif
  337. #ifdef HAVE_LGDT330X
  338. case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q:
  339. dev->ts_gen_cntrl = 0x08;
  340. {
  341. /* Do a hardware reset of chip before using it. */
  342. struct cx88_core *core = dev->core;
  343. cx_clear(MO_GP0_IO, 1);
  344. mdelay(100);
  345. cx_set(MO_GP0_IO, 1);
  346. mdelay(200);
  347. /* Select RF connector callback */
  348. fusionhdtv_3_gold.pll_rf_set = lgdt330x_pll_rf_set;
  349. dev->core->pll_addr = 0x61;
  350. dev->core->pll_desc = &dvb_pll_microtune_4042;
  351. dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold,
  352. &dev->core->i2c_adap);
  353. }
  354. break;
  355. case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T:
  356. dev->ts_gen_cntrl = 0x08;
  357. {
  358. /* Do a hardware reset of chip before using it. */
  359. struct cx88_core *core = dev->core;
  360. cx_clear(MO_GP0_IO, 1);
  361. mdelay(100);
  362. cx_set(MO_GP0_IO, 9);
  363. mdelay(200);
  364. dev->core->pll_addr = 0x61;
  365. dev->core->pll_desc = &dvb_pll_thomson_dtt7611;
  366. dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold,
  367. &dev->core->i2c_adap);
  368. }
  369. break;
  370. case CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD:
  371. dev->ts_gen_cntrl = 0x08;
  372. {
  373. /* Do a hardware reset of chip before using it. */
  374. struct cx88_core *core = dev->core;
  375. cx_clear(MO_GP0_IO, 1);
  376. mdelay(100);
  377. cx_set(MO_GP0_IO, 1);
  378. mdelay(200);
  379. dev->core->pll_addr = 0x61;
  380. dev->core->pll_desc = &dvb_pll_tdvs_tua6034;
  381. dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_5_gold,
  382. &dev->core->i2c_adap);
  383. }
  384. break;
  385. #endif
  386. #ifdef HAVE_NXT200X
  387. case CX88_BOARD_ATI_HDTVWONDER:
  388. dev->dvb.frontend = nxt200x_attach(&ati_hdtvwonder,
  389. &dev->core->i2c_adap);
  390. break;
  391. #endif
  392. #ifdef HAVE_CX24123
  393. case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
  394. case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
  395. dev->dvb.frontend = cx24123_attach(&hauppauge_novas_config,
  396. &dev->core->i2c_adap);
  397. break;
  398. #endif
  399. default:
  400. printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
  401. dev->core->name);
  402. break;
  403. }
  404. if (NULL == dev->dvb.frontend) {
  405. printk("%s: frontend initialization failed\n",dev->core->name);
  406. return -1;
  407. }
  408. if (dev->core->pll_desc) {
  409. dev->dvb.frontend->ops->info.frequency_min = dev->core->pll_desc->min;
  410. dev->dvb.frontend->ops->info.frequency_max = dev->core->pll_desc->max;
  411. }
  412. /* Put the analog decoder in standby to keep it quiet */
  413. cx88_call_i2c_clients (dev->core, TUNER_SET_STANDBY, NULL);
  414. /* register everything */
  415. return videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev);
  416. }
  417. /* ----------------------------------------------------------- */
  418. static int __devinit dvb_probe(struct pci_dev *pci_dev,
  419. const struct pci_device_id *pci_id)
  420. {
  421. struct cx8802_dev *dev;
  422. struct cx88_core *core;
  423. int err;
  424. /* general setup */
  425. core = cx88_core_get(pci_dev);
  426. if (NULL == core)
  427. return -EINVAL;
  428. err = -ENODEV;
  429. if (!cx88_boards[core->board].dvb)
  430. goto fail_core;
  431. err = -ENOMEM;
  432. dev = kmalloc(sizeof(*dev),GFP_KERNEL);
  433. if (NULL == dev)
  434. goto fail_core;
  435. memset(dev,0,sizeof(*dev));
  436. dev->pci = pci_dev;
  437. dev->core = core;
  438. err = cx8802_init_common(dev);
  439. if (0 != err)
  440. goto fail_free;
  441. /* dvb stuff */
  442. printk("%s/2: cx2388x based dvb card\n", core->name);
  443. videobuf_queue_init(&dev->dvb.dvbq, &dvb_qops,
  444. dev->pci, &dev->slock,
  445. V4L2_BUF_TYPE_VIDEO_CAPTURE,
  446. V4L2_FIELD_TOP,
  447. sizeof(struct cx88_buffer),
  448. dev);
  449. err = dvb_register(dev);
  450. if (0 != err)
  451. goto fail_fini;
  452. return 0;
  453. fail_fini:
  454. cx8802_fini_common(dev);
  455. fail_free:
  456. kfree(dev);
  457. fail_core:
  458. cx88_core_put(core,pci_dev);
  459. return err;
  460. }
  461. static void __devexit dvb_remove(struct pci_dev *pci_dev)
  462. {
  463. struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
  464. /* dvb */
  465. videobuf_dvb_unregister(&dev->dvb);
  466. /* common */
  467. cx8802_fini_common(dev);
  468. cx88_core_put(dev->core,dev->pci);
  469. kfree(dev);
  470. }
  471. static struct pci_device_id cx8802_pci_tbl[] = {
  472. {
  473. .vendor = 0x14f1,
  474. .device = 0x8802,
  475. .subvendor = PCI_ANY_ID,
  476. .subdevice = PCI_ANY_ID,
  477. },{
  478. /* --- end of list --- */
  479. }
  480. };
  481. MODULE_DEVICE_TABLE(pci, cx8802_pci_tbl);
  482. static struct pci_driver dvb_pci_driver = {
  483. .name = "cx88-dvb",
  484. .id_table = cx8802_pci_tbl,
  485. .probe = dvb_probe,
  486. .remove = __devexit_p(dvb_remove),
  487. .suspend = cx8802_suspend_common,
  488. .resume = cx8802_resume_common,
  489. };
  490. static int dvb_init(void)
  491. {
  492. printk(KERN_INFO "cx2388x dvb driver version %d.%d.%d loaded\n",
  493. (CX88_VERSION_CODE >> 16) & 0xff,
  494. (CX88_VERSION_CODE >> 8) & 0xff,
  495. CX88_VERSION_CODE & 0xff);
  496. #ifdef SNAPSHOT
  497. printk(KERN_INFO "cx2388x: snapshot date %04d-%02d-%02d\n",
  498. SNAPSHOT/10000, (SNAPSHOT/100)%100, SNAPSHOT%100);
  499. #endif
  500. return pci_register_driver(&dvb_pci_driver);
  501. }
  502. static void dvb_fini(void)
  503. {
  504. pci_unregister_driver(&dvb_pci_driver);
  505. }
  506. module_init(dvb_init);
  507. module_exit(dvb_fini);
  508. /*
  509. * Local variables:
  510. * c-basic-offset: 8
  511. * compile-command: "make DVB=1"
  512. * End:
  513. */