diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2013-07-11 11:56:32 +0200 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-21 19:12:27 +0900 |
commit | 729e00f5c0a8ee58a5fb9f8815fcf09aa03671cb (patch) | |
tree | c542d9f9eccb3fd5f3f02c8f46aaa1404f0f2608 /include | |
parent | 8fb875dec1ab24b890f46f769823173890053455 (diff) | |
download | linux-3.10-729e00f5c0a8ee58a5fb9f8815fcf09aa03671cb.tar.gz linux-3.10-729e00f5c0a8ee58a5fb9f8815fcf09aa03671cb.tar.bz2 linux-3.10-729e00f5c0a8ee58a5fb9f8815fcf09aa03671cb.zip |
drm/gem: simplify object initialization
drm_gem_object_init() and drm_gem_private_object_init() do exactly the
same (except for shmem alloc) so make the first use the latter to reduce
code duplication.
Also drop the return code from drm_gem_private_object_init(). It seems
unlikely that we will extend it any time soon so no reason to keep it
around. This simplifies code paths in drivers, too.
Last but not least, fix gma500 to call drm_gem_object_release() before
freeing objects that were allocated via drm_gem_private_object_init().
That isn't actually necessary for now, but might be in the future.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drmP.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 4892a837803..7eedd2c89a0 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1670,8 +1670,8 @@ struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev, size_t size); int drm_gem_object_init(struct drm_device *dev, struct drm_gem_object *obj, size_t size); -int drm_gem_private_object_init(struct drm_device *dev, - struct drm_gem_object *obj, size_t size); +void drm_gem_private_object_init(struct drm_device *dev, + struct drm_gem_object *obj, size_t size); void drm_gem_object_handle_free(struct drm_gem_object *obj); void drm_gem_vm_open(struct vm_area_struct *vma); void drm_gem_vm_close(struct vm_area_struct *vma); |