aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/i810_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/i810_drv.c')
-rw-r--r--drivers/char/drm/i810_drv.c63
1 files changed, 31 insertions, 32 deletions
diff --git a/drivers/char/drm/i810_drv.c b/drivers/char/drm/i810_drv.c
index 00609329d578..070cef6c2b46 100644
--- a/drivers/char/drm/i810_drv.c
+++ b/drivers/char/drm/i810_drv.c
@@ -38,7 +38,7 @@
38 38
39#include "drm_pciids.h" 39#include "drm_pciids.h"
40 40
41static int postinit( struct drm_device *dev, unsigned long flags ) 41static int postinit(struct drm_device *dev, unsigned long flags)
42{ 42{
43 /* i810 has 4 more counters */ 43 /* i810 has 4 more counters */
44 dev->counters += 4; 44 dev->counters += 4;
@@ -46,29 +46,27 @@ static int postinit( struct drm_device *dev, unsigned long flags )
46 dev->types[7] = _DRM_STAT_PRIMARY; 46 dev->types[7] = _DRM_STAT_PRIMARY;
47 dev->types[8] = _DRM_STAT_SECONDARY; 47 dev->types[8] = _DRM_STAT_SECONDARY;
48 dev->types[9] = _DRM_STAT_DMA; 48 dev->types[9] = _DRM_STAT_DMA;
49 49
50 DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n", 50 DRM_INFO("Initialized %s %d.%d.%d %s on minor %d: %s\n",
51 DRIVER_NAME, 51 DRIVER_NAME,
52 DRIVER_MAJOR, 52 DRIVER_MAJOR,
53 DRIVER_MINOR, 53 DRIVER_MINOR,
54 DRIVER_PATCHLEVEL, 54 DRIVER_PATCHLEVEL,
55 DRIVER_DATE, 55 DRIVER_DATE, dev->primary.minor, pci_pretty_name(dev->pdev)
56 dev->primary.minor, 56 );
57 pci_pretty_name(dev->pdev)
58 );
59 return 0; 57 return 0;
60} 58}
61 59
62static int version( drm_version_t *version ) 60static int version(drm_version_t * version)
63{ 61{
64 int len; 62 int len;
65 63
66 version->version_major = DRIVER_MAJOR; 64 version->version_major = DRIVER_MAJOR;
67 version->version_minor = DRIVER_MINOR; 65 version->version_minor = DRIVER_MINOR;
68 version->version_patchlevel = DRIVER_PATCHLEVEL; 66 version->version_patchlevel = DRIVER_PATCHLEVEL;
69 DRM_COPY( version->name, DRIVER_NAME ); 67 DRM_COPY(version->name, DRIVER_NAME);
70 DRM_COPY( version->date, DRIVER_DATE ); 68 DRM_COPY(version->date, DRIVER_DATE);
71 DRM_COPY( version->desc, DRIVER_DESC ); 69 DRM_COPY(version->desc, DRIVER_DESC);
72 return 0; 70 return 0;
73} 71}
74 72
@@ -76,11 +74,10 @@ static struct pci_device_id pciidlist[] = {
76 i810_PCI_IDS 74 i810_PCI_IDS
77}; 75};
78 76
79extern drm_ioctl_desc_t i810_ioctls[];
80extern int i810_max_ioctl;
81
82static struct drm_driver driver = { 77static struct drm_driver driver = {
83 .driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE, 78 .driver_features =
79 DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR |
80 DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE,
84 .dev_priv_size = sizeof(drm_i810_buf_priv_t), 81 .dev_priv_size = sizeof(drm_i810_buf_priv_t),
85 .pretakedown = i810_driver_pretakedown, 82 .pretakedown = i810_driver_pretakedown,
86 .prerelease = i810_driver_prerelease, 83 .prerelease = i810_driver_prerelease,
@@ -94,18 +91,20 @@ static struct drm_driver driver = {
94 .version = version, 91 .version = version,
95 .ioctls = i810_ioctls, 92 .ioctls = i810_ioctls,
96 .fops = { 93 .fops = {
97 .owner = THIS_MODULE, 94 .owner = THIS_MODULE,
98 .open = drm_open, 95 .open = drm_open,
99 .release = drm_release, 96 .release = drm_release,
100 .ioctl = drm_ioctl, 97 .ioctl = drm_ioctl,
101 .mmap = drm_mmap, 98 .mmap = drm_mmap,
102 .poll = drm_poll, 99 .poll = drm_poll,
103 .fasync = drm_fasync, 100 .fasync = drm_fasync,
104 }, 101 }
102 ,
105 .pci_driver = { 103 .pci_driver = {
106 .name = DRIVER_NAME, 104 .name = DRIVER_NAME,
107 .id_table = pciidlist, 105 .id_table = pciidlist,
108 }, 106 }
107 ,
109}; 108};
110 109
111static int __init i810_init(void) 110static int __init i810_init(void)
@@ -122,6 +121,6 @@ static void __exit i810_exit(void)
122module_init(i810_init); 121module_init(i810_init);
123module_exit(i810_exit); 122module_exit(i810_exit);
124 123
125MODULE_AUTHOR( DRIVER_AUTHOR ); 124MODULE_AUTHOR(DRIVER_AUTHOR);
126MODULE_DESCRIPTION( DRIVER_DESC ); 125MODULE_DESCRIPTION(DRIVER_DESC);
127MODULE_LICENSE("GPL and additional rights"); 126MODULE_LICENSE("GPL and additional rights");