summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/r128_cce.c
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-11-24 05:51:24 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-11-24 05:51:24 +0000
commit3162ea963766ba6b006f688ae05c692d7a955d60 (patch)
treee00bcd0ec8653957deb47b0510513b0034d90177 /sys/dev/pci/drm/r128_cce.c
parent76a1250eebd5c78858b3fadb4399f38cf77c399c (diff)
Instead of having a ``private data'' pointer in the dma buffers, just
ask the driver how large they need the structure we allocate to be, and use inheritance like we do for struct device. Simplifies things a little bit and saves us a pointer.
Diffstat (limited to 'sys/dev/pci/drm/r128_cce.c')
-rw-r--r--sys/dev/pci/drm/r128_cce.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/r128_cce.c b/sys/dev/pci/drm/r128_cce.c
index 2f3f8bd05ac..53e2e2ee132 100644
--- a/sys/dev/pci/drm/r128_cce.c
+++ b/sys/dev/pci/drm/r128_cce.c
@@ -784,7 +784,7 @@ static struct drm_buf *r128_freelist_get(struct drm_device * dev)
for (i = 0; i < dma->buf_count; i++) {
buf = dma->buflist[i];
- buf_priv = buf->dev_private;
+ buf_priv = (drm_r128_buf_priv_t *)buf;
if (buf->file_priv == 0)
return buf;
}
@@ -794,7 +794,7 @@ static struct drm_buf *r128_freelist_get(struct drm_device * dev)
for (i = 0; i < dma->buf_count; i++) {
buf = dma->buflist[i];
- buf_priv = buf->dev_private;
+ buf_priv = (drm_r128_buf_priv_t *)buf;
if (buf->pending && buf_priv->age <= done_age) {
/* The buffer has been processed, so it
* can now be used.
@@ -817,7 +817,7 @@ void r128_freelist_reset(struct drm_device * dev)
for (i = 0; i < dma->buf_count; i++) {
struct drm_buf *buf = dma->buflist[i];
- drm_r128_buf_priv_t *buf_priv = buf->dev_private;
+ drm_r128_buf_priv_t *buf_priv = (drm_r128_buf_priv_t *)buf;
buf_priv->age = 0;
}
}