diff options
Diffstat (limited to 'sys/dev/drm/drm_dma.c')
-rw-r--r-- | sys/dev/drm/drm_dma.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/dev/drm/drm_dma.c b/sys/dev/drm/drm_dma.c index 1ba3fdf7c6e1..e630c2549e3c 100644 --- a/sys/dev/drm/drm_dma.c +++ b/sys/dev/drm/drm_dma.c @@ -61,14 +61,12 @@ void drm_dma_takedown(struct drm_device *dev) if (dma == NULL) return; - /* Clear dma buffers */ + /* Clear dma buffers */ for (i = 0; i <= DRM_MAX_ORDER; i++) { if (dma->bufs[i].seg_count) { DRM_DEBUG("order %d: buf_count = %d," - " seg_count = %d\n", - i, - dma->bufs[i].buf_count, - dma->bufs[i].seg_count); + " seg_count = %d\n", i, dma->bufs[i].buf_count, + dma->bufs[i].seg_count); for (j = 0; j < dma->bufs[i].seg_count; j++) { drm_pci_free(dev, dma->bufs[i].seglist[j]); } @@ -94,7 +92,8 @@ void drm_dma_takedown(struct drm_device *dev) void drm_free_buffer(struct drm_device *dev, drm_buf_t *buf) { - if (!buf) return; + if (!buf) + return; buf->pending = 0; buf->file_priv= NULL; @@ -106,7 +105,9 @@ void drm_reclaim_buffers(struct drm_device *dev, struct drm_file *file_priv) drm_device_dma_t *dma = dev->dma; int i; - if (!dma) return; + if (!dma) + return; + for (i = 0; i < dma->buf_count; i++) { if (dma->buflist[i]->file_priv == file_priv) { switch (dma->buflist[i]->list) { @@ -128,9 +129,9 @@ void drm_reclaim_buffers(struct drm_device *dev, struct drm_file *file_priv) int drm_dma(struct drm_device *dev, void *data, struct drm_file *file_priv) { - if (dev->driver.dma_ioctl) { + if (dev->driver->dma_ioctl) { /* shared code returns -errno */ - return -dev->driver.dma_ioctl(dev, data, file_priv); + return -dev->driver->dma_ioctl(dev, data, file_priv); } else { DRM_DEBUG("DMA ioctl on driver with no dma handler\n"); return EINVAL; |