diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-10-07 21:59:34 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-10-07 21:59:34 +0000 |
commit | 42029dea90615aabb34095ab75e07c870aed697e (patch) | |
tree | 9352262ae24879f8db3984f0282cb13b24cae88d /sys/dev/pci/drm/drm_lock.c | |
parent | 584f3a15eadcca708f1e980aa0e8f7ad0a323666 (diff) |
Move dev->driver over to being a pointer to a const struct, instead of stupidly
filling in a pre-allocated one on each attach.
Makes the code a bunch nicer, shrinks a kernel by about 1.5k on amd64,
helps with my sanity, and paves way for later changes.
Tested by a few for a couple of weeks now.
Diffstat (limited to 'sys/dev/pci/drm/drm_lock.c')
-rw-r--r-- | sys/dev/pci/drm/drm_lock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/drm_lock.c b/sys/dev/pci/drm/drm_lock.c index 9519cb137eb..de4fa1dd38c 100644 --- a/sys/dev/pci/drm/drm_lock.c +++ b/sys/dev/pci/drm/drm_lock.c @@ -118,7 +118,7 @@ drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) lock->context, DRM_CURRENTPID, dev->lock.hw_lock->lock, lock->flags); - if (dev->driver.use_dma_queue && lock->context < 0) + if (dev->driver->use_dma_queue && lock->context < 0) return EINVAL; mtx_enter(&dev->lock.spinlock); @@ -143,9 +143,9 @@ drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) /* XXX: Add signal blocking here */ - if (dev->driver.dma_quiescent != NULL && + if (dev->driver->dma_quiescent != NULL && (lock->flags & _DRM_LOCK_QUIESCENT)) - dev->driver.dma_quiescent(dev); + dev->driver->dma_quiescent(dev); return 0; } |