Rev 605 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
602 | giacomo | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Giacomo Guidi <giacomo@gandalf.sssup.it> |
||
10 | * |
||
11 | * |
||
12 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
13 | * |
||
14 | * http://www.sssup.it |
||
15 | * http://retis.sssup.it |
||
16 | * http://shark.sssup.it |
||
17 | */ |
||
18 | |||
19 | /* Glue Layer for Linux PCI 2.6 Driver */ |
||
20 | |||
21 | #include <kernel/kern.h> |
||
22 | |||
23 | extern int bttv_init_module(void); |
||
618 | giacomo | 24 | extern void bttv_cleanup_module(void); |
602 | giacomo | 25 | |
26 | static int bttv_installed = FALSE; |
||
27 | |||
28 | /* Init the Linux BTTV 2.6 Driver */ |
||
29 | int BTTV26_installed(void) |
||
30 | { |
||
31 | return bttv_installed; |
||
32 | } |
||
33 | |||
605 | giacomo | 34 | extern int videodev_init(void); |
35 | |||
602 | giacomo | 36 | int BTTV26_init() { |
37 | |||
618 | giacomo | 38 | int res; |
39 | |||
602 | giacomo | 40 | if (bttv_installed == TRUE) |
41 | return 0; |
||
42 | |||
605 | giacomo | 43 | videodev_init(); |
44 | |||
618 | giacomo | 45 | res = bttv_init_module(); |
602 | giacomo | 46 | |
618 | giacomo | 47 | if (res != 0) { |
48 | sys_shutdown_message("ERROR: Cannot initialize BTTV\n"); |
||
49 | sys_end(); |
||
50 | } |
||
51 | |||
602 | giacomo | 52 | bttv_installed = TRUE; |
53 | |||
54 | return 0; |
||
55 | |||
56 | } |
||
618 | giacomo | 57 | |
58 | int BTTV26_close() { |
||
59 | |||
60 | if (bttv_installed == FALSE) |
||
61 | return 0; |
||
62 | |||
63 | bttv_cleanup_module(); |
||
64 | |||
65 | return 0; |
||
66 | |||
67 | } |