From c1119b1b092527fbb6950d0b5e51e076ddb00f29 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 20 Jul 2007 06:39:25 -0700 Subject: Replace filp in ioctl arguments with drm_file *file_priv. As a fallout, replace filp storage with file_priv storage for "unique identifier of a client" all over the DRM. There is a 1:1 mapping, so this should be a noop. This could be a minor performance improvement, as everything on Linux dereferenced filp to get file_priv anyway, while only the mmap ioctls went the other direction. --- bsd-core/drm_dma.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bsd-core/drm_dma.c') diff --git a/bsd-core/drm_dma.c b/bsd-core/drm_dma.c index 90678dfc..fc219039 100644 --- a/bsd-core/drm_dma.c +++ b/bsd-core/drm_dma.c @@ -89,18 +89,18 @@ void drm_free_buffer(drm_device_t *dev, drm_buf_t *buf) if (!buf) return; buf->pending = 0; - buf->filp = NULL; + buf->file_priv= NULL; buf->used = 0; } -void drm_reclaim_buffers(drm_device_t *dev, DRMFILE filp) +void drm_reclaim_buffers(drm_device_t *dev, struct drm_file *file_priv) { drm_device_dma_t *dma = dev->dma; int i; if (!dma) return; for (i = 0; i < dma->buf_count; i++) { - if (dma->buflist[i]->filp == filp) { + if (dma->buflist[i]->file_priv == file_priv) { switch (dma->buflist[i]->list) { case DRM_LIST_NONE: drm_free_buffer(dev, dma->buflist[i]); @@ -122,7 +122,8 @@ int drm_dma(DRM_IOCTL_ARGS) DRM_DEVICE; if (dev->driver.dma_ioctl) { - return -dev->driver.dma_ioctl(kdev, cmd, data, flags, p, filp); + return -dev->driver.dma_ioctl(kdev, cmd, data, flags, p, + file_priv); } else { DRM_DEBUG("DMA ioctl on driver with no dma handler\n"); return EINVAL; -- cgit v1.2.3