aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/i830_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/i830_drv.c')
-rw-r--r--drivers/char/drm/i830_drv.c59
1 files changed, 30 insertions, 29 deletions
diff --git a/drivers/char/drm/i830_drv.c b/drivers/char/drm/i830_drv.c
index 0da9cd19919e..6dad356450bc 100644
--- a/drivers/char/drm/i830_drv.c
+++ b/drivers/char/drm/i830_drv.c
@@ -40,36 +40,34 @@
40 40
41#include "drm_pciids.h" 41#include "drm_pciids.h"
42 42
43static int postinit( struct drm_device *dev, unsigned long flags ) 43static int postinit(struct drm_device *dev, unsigned long flags)
44{ 44{
45 dev->counters += 4; 45 dev->counters += 4;
46 dev->types[6] = _DRM_STAT_IRQ; 46 dev->types[6] = _DRM_STAT_IRQ;
47 dev->types[7] = _DRM_STAT_PRIMARY; 47 dev->types[7] = _DRM_STAT_PRIMARY;
48 dev->types[8] = _DRM_STAT_SECONDARY; 48 dev->types[8] = _DRM_STAT_SECONDARY;
49 dev->types[9] = _DRM_STAT_DMA; 49 dev->types[9] = _DRM_STAT_DMA;
50 50
51 DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n", 51 DRM_INFO("Initialized %s %d.%d.%d %s on minor %d: %s\n",
52 DRIVER_NAME, 52 DRIVER_NAME,
53 DRIVER_MAJOR, 53 DRIVER_MAJOR,
54 DRIVER_MINOR, 54 DRIVER_MINOR,
55 DRIVER_PATCHLEVEL, 55 DRIVER_PATCHLEVEL,
56 DRIVER_DATE, 56 DRIVER_DATE, dev->primary.minor, pci_pretty_name(dev->pdev)
57 dev->primary.minor, 57 );
58 pci_pretty_name(dev->pdev)
59 );
60 return 0; 58 return 0;
61} 59}
62 60
63static int version( drm_version_t *version ) 61static int version(drm_version_t * version)
64{ 62{
65 int len; 63 int len;
66 64
67 version->version_major = DRIVER_MAJOR; 65 version->version_major = DRIVER_MAJOR;
68 version->version_minor = DRIVER_MINOR; 66 version->version_minor = DRIVER_MINOR;
69 version->version_patchlevel = DRIVER_PATCHLEVEL; 67 version->version_patchlevel = DRIVER_PATCHLEVEL;
70 DRM_COPY( version->name, DRIVER_NAME ); 68 DRM_COPY(version->name, DRIVER_NAME);
71 DRM_COPY( version->date, DRIVER_DATE ); 69 DRM_COPY(version->date, DRIVER_DATE);
72 DRM_COPY( version->desc, DRIVER_DESC ); 70 DRM_COPY(version->desc, DRIVER_DESC);
73 return 0; 71 return 0;
74} 72}
75 73
@@ -81,7 +79,9 @@ extern drm_ioctl_desc_t i830_ioctls[];
81extern int i830_max_ioctl; 79extern int i830_max_ioctl;
82 80
83static struct drm_driver driver = { 81static struct drm_driver driver = {
84 .driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE, 82 .driver_features =
83 DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR |
84 DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE,
85#if USE_IRQS 85#if USE_IRQS
86 .driver_features |= DRIVER_HAVE_IRQ | DRIVER_SHARED_IRQ, 86 .driver_features |= DRIVER_HAVE_IRQ | DRIVER_SHARED_IRQ,
87#endif 87#endif
@@ -104,18 +104,19 @@ static struct drm_driver driver = {
104 .version = version, 104 .version = version,
105 .ioctls = i830_ioctls, 105 .ioctls = i830_ioctls,
106 .fops = { 106 .fops = {
107 .owner = THIS_MODULE, 107 .owner = THIS_MODULE,
108 .open = drm_open, 108 .open = drm_open,
109 .release = drm_release, 109 .release = drm_release,
110 .ioctl = drm_ioctl, 110 .ioctl = drm_ioctl,
111 .mmap = drm_mmap, 111 .mmap = drm_mmap,
112 .poll = drm_poll, 112 .poll = drm_poll,
113 .fasync = drm_fasync, 113 .fasync = drm_fasync,
114 }, 114 }
115 ,
115 .pci_driver = { 116 .pci_driver = {
116 .name = DRIVER_NAME, 117 .name = DRIVER_NAME,
117 .id_table = pciidlist, 118 .id_table = pciidlist,
118 } 119 }
119 120
120}; 121};
121 122
@@ -133,6 +134,6 @@ static void __exit i830_exit(void)
133module_init(i830_init); 134module_init(i830_init);
134module_exit(i830_exit); 135module_exit(i830_exit);
135 136
136MODULE_AUTHOR( DRIVER_AUTHOR ); 137MODULE_AUTHOR(DRIVER_AUTHOR);
137MODULE_DESCRIPTION( DRIVER_DESC ); 138MODULE_DESCRIPTION(DRIVER_DESC);
138MODULE_LICENSE("GPL and additional rights"); 139MODULE_LICENSE("GPL and additional rights");