This source file includes following definitions.
- tdfx_init
- tdfx_exit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 #include <linux/module.h>
34
35 #include <drm/drm_drv.h>
36 #include <drm/drm_file.h>
37 #include <drm/drm_ioctl.h>
38 #include <drm/drm_legacy.h>
39 #include <drm/drm_pci.h>
40 #include <drm/drm_pciids.h>
41
42 #include "tdfx_drv.h"
43
44 static struct pci_device_id pciidlist[] = {
45 tdfx_PCI_IDS
46 };
47
48 static const struct file_operations tdfx_driver_fops = {
49 .owner = THIS_MODULE,
50 .open = drm_open,
51 .release = drm_release,
52 .unlocked_ioctl = drm_ioctl,
53 .mmap = drm_legacy_mmap,
54 .poll = drm_poll,
55 .compat_ioctl = drm_compat_ioctl,
56 .llseek = noop_llseek,
57 };
58
59 static struct drm_driver driver = {
60 .driver_features = DRIVER_LEGACY,
61 .fops = &tdfx_driver_fops,
62 .name = DRIVER_NAME,
63 .desc = DRIVER_DESC,
64 .date = DRIVER_DATE,
65 .major = DRIVER_MAJOR,
66 .minor = DRIVER_MINOR,
67 .patchlevel = DRIVER_PATCHLEVEL,
68 };
69
70 static struct pci_driver tdfx_pci_driver = {
71 .name = DRIVER_NAME,
72 .id_table = pciidlist,
73 };
74
75 static int __init tdfx_init(void)
76 {
77 return drm_legacy_pci_init(&driver, &tdfx_pci_driver);
78 }
79
80 static void __exit tdfx_exit(void)
81 {
82 drm_legacy_pci_exit(&driver, &tdfx_pci_driver);
83 }
84
85 module_init(tdfx_init);
86 module_exit(tdfx_exit);
87
88 MODULE_AUTHOR(DRIVER_AUTHOR);
89 MODULE_DESCRIPTION(DRIVER_DESC);
90 MODULE_LICENSE("GPL and additional rights");