aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/savage_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/savage_drv.c')
-rw-r--r--drivers/char/drm/savage_drv.c50
1 files changed, 16 insertions, 34 deletions
diff --git a/drivers/char/drm/savage_drv.c b/drivers/char/drm/savage_drv.c
index 22d799cde41c..aa6c0d1a82f8 100644
--- a/drivers/char/drm/savage_drv.c
+++ b/drivers/char/drm/savage_drv.c
@@ -30,31 +30,6 @@
30 30
31#include "drm_pciids.h" 31#include "drm_pciids.h"
32 32
33static int postinit(struct drm_device *dev, unsigned long flags)
34{
35 DRM_INFO("Initialized %s %d.%d.%d %s on minor %d: %s\n",
36 DRIVER_NAME,
37 DRIVER_MAJOR,
38 DRIVER_MINOR,
39 DRIVER_PATCHLEVEL,
40 DRIVER_DATE, dev->primary.minor, pci_pretty_name(dev->pdev)
41 );
42 return 0;
43}
44
45static int version(drm_version_t * version)
46{
47 int len;
48
49 version->version_major = DRIVER_MAJOR;
50 version->version_minor = DRIVER_MINOR;
51 version->version_patchlevel = DRIVER_PATCHLEVEL;
52 DRM_COPY(version->name, DRIVER_NAME);
53 DRM_COPY(version->date, DRIVER_DATE);
54 DRM_COPY(version->desc, DRIVER_DESC);
55 return 0;
56}
57
58static struct pci_device_id pciidlist[] = { 33static struct pci_device_id pciidlist[] = {
59 savage_PCI_IDS 34 savage_PCI_IDS
60}; 35};
@@ -63,13 +38,13 @@ static struct drm_driver driver = {
63 .driver_features = 38 .driver_features =
64 DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_PCI_DMA, 39 DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_PCI_DMA,
65 .dev_priv_size = sizeof(drm_savage_buf_priv_t), 40 .dev_priv_size = sizeof(drm_savage_buf_priv_t),
66 .preinit = savage_preinit, 41 .load = savage_driver_load,
67 .postinit = postinit, 42 .firstopen = savage_driver_firstopen,
68 .postcleanup = savage_postcleanup, 43 .lastclose = savage_driver_lastclose,
44 .unload = savage_driver_unload,
69 .reclaim_buffers = savage_reclaim_buffers, 45 .reclaim_buffers = savage_reclaim_buffers,
70 .get_map_ofs = drm_core_get_map_ofs, 46 .get_map_ofs = drm_core_get_map_ofs,
71 .get_reg_ofs = drm_core_get_reg_ofs, 47 .get_reg_ofs = drm_core_get_reg_ofs,
72 .version = version,
73 .ioctls = savage_ioctls, 48 .ioctls = savage_ioctls,
74 .dma_ioctl = savage_bci_buffers, 49 .dma_ioctl = savage_bci_buffers,
75 .fops = { 50 .fops = {
@@ -80,12 +55,19 @@ static struct drm_driver driver = {
80 .mmap = drm_mmap, 55 .mmap = drm_mmap,
81 .poll = drm_poll, 56 .poll = drm_poll,
82 .fasync = drm_fasync, 57 .fasync = drm_fasync,
83 } 58 },
84 , 59
85 .pci_driver = { 60 .pci_driver = {
86 .name = DRIVER_NAME, 61 .name = DRIVER_NAME,
87 .id_table = pciidlist, 62 .id_table = pciidlist,
88 } 63 },
64
65 .name = DRIVER_NAME,
66 .desc = DRIVER_DESC,
67 .date = DRIVER_DATE,
68 .major = DRIVER_MAJOR,
69 .minor = DRIVER_MINOR,
70 .patchlevel = DRIVER_PATCHLEVEL,
89}; 71};
90 72
91static int __init savage_init(void) 73static int __init savage_init(void)