summaryrefslogtreecommitdiff
path: root/linux/i810_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/i810_dma.c')
-rw-r--r--linux/i810_dma.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/linux/i810_dma.c b/linux/i810_dma.c
index de9345e3..a3727164 100644
--- a/linux/i810_dma.c
+++ b/linux/i810_dma.c
@@ -122,9 +122,7 @@ static struct file_operations i810_buffer_fops = {
.release = DRM(release),
.ioctl = DRM(ioctl),
.mmap = i810_mmap_buffers,
- .read = DRM(read),
.fasync = DRM(fasync),
- .poll = DRM(poll),
};
int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
@@ -263,7 +261,8 @@ static int i810_dma_cleanup(drm_device_t *dev)
for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[ i ];
drm_i810_buf_priv_t *buf_priv = buf->dev_private;
- DRM(ioremapfree)(buf_priv->kernel_virtual, buf->total);
+ if ( buf_priv->kernel_virtual && buf->total )
+ DRM(ioremapfree)(buf_priv->kernel_virtual, buf->total);
}
}
return 0;
@@ -347,7 +346,7 @@ static int i810_dma_initialize(drm_device_t *dev,
memset(dev_priv, 0, sizeof(drm_i810_private_t));
list_for_each(list, &dev->maplist->head) {
- drm_map_list_t *r_list = (drm_map_list_t *)list;
+ drm_map_list_t *r_list = list_entry(list, drm_map_list_t, head);
if( r_list->map &&
r_list->map->type == _DRM_SHM &&
r_list->map->flags & _DRM_CONTAINS_LOCK ) {