diff options
Diffstat (limited to 'drivers/gpu/drm/drm_fops.c')
-rw-r--r-- | drivers/gpu/drm/drm_fops.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index 09a3571c9908..251bc0e3b5ec 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c | |||
@@ -240,7 +240,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp, | |||
240 | 240 | ||
241 | DRM_DEBUG("pid = %d, minor = %d\n", task_pid_nr(current), minor_id); | 241 | DRM_DEBUG("pid = %d, minor = %d\n", task_pid_nr(current), minor_id); |
242 | 242 | ||
243 | priv = drm_alloc(sizeof(*priv), DRM_MEM_FILES); | 243 | priv = kmalloc(sizeof(*priv), GFP_KERNEL); |
244 | if (!priv) | 244 | if (!priv) |
245 | return -ENOMEM; | 245 | return -ENOMEM; |
246 | 246 | ||
@@ -328,7 +328,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp, | |||
328 | 328 | ||
329 | return 0; | 329 | return 0; |
330 | out_free: | 330 | out_free: |
331 | drm_free(priv, sizeof(*priv), DRM_MEM_FILES); | 331 | kfree(priv); |
332 | filp->private_data = NULL; | 332 | filp->private_data = NULL; |
333 | return ret; | 333 | return ret; |
334 | } | 334 | } |
@@ -471,7 +471,7 @@ int drm_release(struct inode *inode, struct file *filp) | |||
471 | drm_ctxbitmap_free(dev, pos->handle); | 471 | drm_ctxbitmap_free(dev, pos->handle); |
472 | 472 | ||
473 | list_del(&pos->head); | 473 | list_del(&pos->head); |
474 | drm_free(pos, sizeof(*pos), DRM_MEM_CTXLIST); | 474 | kfree(pos); |
475 | --dev->ctx_count; | 475 | --dev->ctx_count; |
476 | } | 476 | } |
477 | } | 477 | } |
@@ -516,7 +516,7 @@ int drm_release(struct inode *inode, struct file *filp) | |||
516 | 516 | ||
517 | if (dev->driver->postclose) | 517 | if (dev->driver->postclose) |
518 | dev->driver->postclose(dev, file_priv); | 518 | dev->driver->postclose(dev, file_priv); |
519 | drm_free(file_priv, sizeof(*file_priv), DRM_MEM_FILES); | 519 | kfree(file_priv); |
520 | 520 | ||
521 | /* ======================================================== | 521 | /* ======================================================== |
522 | * End inline drm_release | 522 | * End inline drm_release |