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/drm_stub.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/drm_stub.c')
-rw-r--r-- | drivers/char/drm/drm_stub.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c index 60b6f8e8bf69..8568a6b373a0 100644 --- a/drivers/char/drm/drm_stub.c +++ b/drivers/char/drm/drm_stub.c | |||
@@ -93,8 +93,8 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, | |||
93 | 93 | ||
94 | dev->driver = driver; | 94 | dev->driver = driver; |
95 | 95 | ||
96 | if (dev->driver->preinit) | 96 | if (dev->driver->load) |
97 | if ((retcode = dev->driver->preinit(dev, ent->driver_data))) | 97 | if ((retcode = dev->driver->load(dev, ent->driver_data))) |
98 | goto error_out_unreg; | 98 | goto error_out_unreg; |
99 | 99 | ||
100 | if (drm_core_has_AGP(dev)) { | 100 | if (drm_core_has_AGP(dev)) { |
@@ -124,7 +124,7 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, | |||
124 | return 0; | 124 | return 0; |
125 | 125 | ||
126 | error_out_unreg: | 126 | error_out_unreg: |
127 | drm_takedown(dev); | 127 | drm_lastclose(dev); |
128 | return retcode; | 128 | return retcode; |
129 | } | 129 | } |
130 | 130 | ||
@@ -258,11 +258,10 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, | |||
258 | } | 258 | } |
259 | if ((ret = drm_get_head(dev, &dev->primary))) | 259 | if ((ret = drm_get_head(dev, &dev->primary))) |
260 | goto err_g1; | 260 | goto err_g1; |
261 | 261 | ||
262 | /* postinit is a required function to display the signon banner */ | 262 | DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n", |
263 | /* drivers add secondary heads here if needed */ | 263 | driver->name, driver->major, driver->minor, driver->patchlevel, |
264 | if ((ret = dev->driver->postinit(dev, ent->driver_data))) | 264 | driver->date, dev->primary.minor); |
265 | goto err_g1; | ||
266 | 265 | ||
267 | return 0; | 266 | return 0; |
268 | 267 | ||