diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_mem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_mem.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_mem.c b/drivers/gpu/drm/i915/i915_mem.c index 83b7b81bb2b8..cc8f6d49cf20 100644 --- a/drivers/gpu/drm/i915/i915_mem.c +++ b/drivers/gpu/drm/i915/i915_mem.c | |||
@@ -202,7 +202,7 @@ static int init_heap(struct mem_block **heap, int start, int size) | |||
202 | blocks->next = blocks->prev = *heap; | 202 | blocks->next = blocks->prev = *heap; |
203 | 203 | ||
204 | memset(*heap, 0, sizeof(**heap)); | 204 | memset(*heap, 0, sizeof(**heap)); |
205 | (*heap)->file_priv = (struct drm_file *) - 1; | 205 | (*heap)->file_priv = (struct drm_file *) -1; |
206 | (*heap)->next = (*heap)->prev = blocks; | 206 | (*heap)->next = (*heap)->prev = blocks; |
207 | return 0; | 207 | return 0; |
208 | } | 208 | } |
@@ -359,19 +359,19 @@ int i915_mem_init_heap(struct drm_device *dev, void *data, | |||
359 | return init_heap(heap, initheap->start, initheap->size); | 359 | return init_heap(heap, initheap->start, initheap->size); |
360 | } | 360 | } |
361 | 361 | ||
362 | int i915_mem_destroy_heap( struct drm_device *dev, void *data, | 362 | int i915_mem_destroy_heap(struct drm_device *dev, void *data, |
363 | struct drm_file *file_priv ) | 363 | struct drm_file *file_priv) |
364 | { | 364 | { |
365 | drm_i915_private_t *dev_priv = dev->dev_private; | 365 | drm_i915_private_t *dev_priv = dev->dev_private; |
366 | drm_i915_mem_destroy_heap_t *destroyheap = data; | 366 | drm_i915_mem_destroy_heap_t *destroyheap = data; |
367 | struct mem_block **heap; | 367 | struct mem_block **heap; |
368 | 368 | ||
369 | if ( !dev_priv ) { | 369 | if (!dev_priv) { |
370 | DRM_ERROR( "called with no initialization\n" ); | 370 | DRM_ERROR("called with no initialization\n"); |
371 | return -EINVAL; | 371 | return -EINVAL; |
372 | } | 372 | } |
373 | 373 | ||
374 | heap = get_heap( dev_priv, destroyheap->region ); | 374 | heap = get_heap(dev_priv, destroyheap->region); |
375 | if (!heap) { | 375 | if (!heap) { |
376 | DRM_ERROR("get_heap failed"); | 376 | DRM_ERROR("get_heap failed"); |
377 | return -EFAULT; | 377 | return -EFAULT; |
@@ -382,6 +382,6 @@ int i915_mem_destroy_heap( struct drm_device *dev, void *data, | |||
382 | return -EFAULT; | 382 | return -EFAULT; |
383 | } | 383 | } |
384 | 384 | ||
385 | i915_mem_takedown( heap ); | 385 | i915_mem_takedown(heap); |
386 | return 0; | 386 | return 0; |
387 | } | 387 | } |