diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-11-10 06:16:34 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-11-10 06:16:34 -0500 |
commit | 22eae947bf76e236ba972f2f11cfd1b083b736ad (patch) | |
tree | e18a2cdfef9ac0f606eb249df4924fef5e7daebd /drivers/char/drm/sis_drv.c | |
parent | 3b44f137b9a846c5452d9e6e1271b79b1dbcc942 (diff) |
drm: rename driver hooks more understandably
Rename the driver hooks in the DRM to something a little more understandable:
preinit -> load
postinit -> (removed)
presetup -> firstopen
postsetup -> (removed)
open_helper -> open
prerelease -> preclose
free_filp_priv -> postclose
pretakedown -> lastclose
postcleanup -> unload
release -> reclaim_buffers_locked
version -> (removed)
postinit and version were replaced with generic code in the Linux DRM (drivers
now set their version numbers and description in the driver structure, like on
BSD). postsetup wasn't used at all. Fixes the savage hooks for
initializing and tearing down mappings at the right times. Testing involved at
least starting X, running glxgears, killing glxgears, exiting X, and repeating.
Tested on: FreeBSD (g200, g400, r200, r128)
Linux (r200, savage4)
From: Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/sis_drv.c')
-rw-r--r-- | drivers/char/drm/sis_drv.c | 42 |
1 files changed, 11 insertions, 31 deletions
diff --git a/drivers/char/drm/sis_drv.c b/drivers/char/drm/sis_drv.c index 3cef10643a8f..6f6d7d613ede 100644 --- a/drivers/char/drm/sis_drv.c +++ b/drivers/char/drm/sis_drv.c | |||
@@ -32,31 +32,6 @@ | |||
32 | 32 | ||
33 | #include "drm_pciids.h" | 33 | #include "drm_pciids.h" |
34 | 34 | ||
35 | static int postinit(struct drm_device *dev, unsigned long flags) | ||
36 | { | ||
37 | DRM_INFO("Initialized %s %d.%d.%d %s on minor %d: %s\n", | ||
38 | DRIVER_NAME, | ||
39 | DRIVER_MAJOR, | ||
40 | DRIVER_MINOR, | ||
41 | DRIVER_PATCHLEVEL, | ||
42 | DRIVER_DATE, dev->primary.minor, pci_pretty_name(dev->pdev) | ||
43 | ); | ||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | static int version(drm_version_t * version) | ||
48 | { | ||
49 | int len; | ||
50 | |||
51 | version->version_major = DRIVER_MAJOR; | ||
52 | version->version_minor = DRIVER_MINOR; | ||
53 | version->version_patchlevel = DRIVER_PATCHLEVEL; | ||
54 | DRM_COPY(version->name, DRIVER_NAME); | ||
55 | DRM_COPY(version->date, DRIVER_DATE); | ||
56 | DRM_COPY(version->desc, DRIVER_DESC); | ||
57 | return 0; | ||
58 | } | ||
59 | |||
60 | static struct pci_device_id pciidlist[] = { | 35 | static struct pci_device_id pciidlist[] = { |
61 | sisdrv_PCI_IDS | 36 | sisdrv_PCI_IDS |
62 | }; | 37 | }; |
@@ -68,8 +43,6 @@ static struct drm_driver driver = { | |||
68 | .reclaim_buffers = drm_core_reclaim_buffers, | 43 | .reclaim_buffers = drm_core_reclaim_buffers, |
69 | .get_map_ofs = drm_core_get_map_ofs, | 44 | .get_map_ofs = drm_core_get_map_ofs, |
70 | .get_reg_ofs = drm_core_get_reg_ofs, | 45 | .get_reg_ofs = drm_core_get_reg_ofs, |
71 | .postinit = postinit, | ||
72 | .version = version, | ||
73 | .ioctls = sis_ioctls, | 46 | .ioctls = sis_ioctls, |
74 | .fops = { | 47 | .fops = { |
75 | .owner = THIS_MODULE, | 48 | .owner = THIS_MODULE, |
@@ -79,11 +52,18 @@ static struct drm_driver driver = { | |||
79 | .mmap = drm_mmap, | 52 | .mmap = drm_mmap, |
80 | .poll = drm_poll, | 53 | .poll = drm_poll, |
81 | .fasync = drm_fasync, | 54 | .fasync = drm_fasync, |
82 | }, | 55 | }, |
83 | .pci_driver = { | 56 | .pci_driver = { |
84 | .name = DRIVER_NAME, | 57 | .name = DRIVER_NAME, |
85 | .id_table = pciidlist, | 58 | .id_table = pciidlist, |
86 | } | 59 | }, |
60 | |||
61 | .name = DRIVER_NAME, | ||
62 | .desc = DRIVER_DESC, | ||
63 | .date = DRIVER_DATE, | ||
64 | .major = DRIVER_MAJOR, | ||
65 | .minor = DRIVER_MINOR, | ||
66 | .patchlevel = DRIVER_PATCHLEVEL, | ||
87 | }; | 67 | }; |
88 | 68 | ||
89 | static int __init sis_init(void) | 69 | static int __init sis_init(void) |