aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm/ttm_bo.c
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@crashcourse.ca>2010-03-13 10:36:32 +0000
committerDave Airlie <airlied@redhat.com>2010-03-15 10:32:09 +1000
commitb642ed06f2fccf62534f5269358776e0cba28f3c (patch)
tree37591d6c71ba8d2394f1830fa0643ed605643dee /drivers/gpu/drm/ttm/ttm_bo.c
parent72e942dd846f98e2d35aad5436d77a878ef05c5e (diff)
drm: "kobject_init/kobject_add" -> "kobject_init_and_add".
Replace sequential calls to kobject_init() and kobject_add() with the combo wrapper kobject_init_and_add(), which provides the same semantics. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index c7320ce4567d..9db02bb3e3fe 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1425,8 +1425,8 @@ int ttm_bo_global_init(struct ttm_global_reference *ref)
atomic_set(&glob->bo_count, 0);
- kobject_init(&glob->kobj, &ttm_bo_glob_kobj_type);
- ret = kobject_add(&glob->kobj, ttm_get_kobj(), "buffer_objects");
+ ret = kobject_init_and_add(
+ &glob->kobj, &ttm_bo_glob_kobj_type, ttm_get_kobj(), "buffer_objects");
if (unlikely(ret != 0))
kobject_put(&glob->kobj);
return ret;