diff options
Diffstat (limited to 'drivers/gpu/drm/drm_mode_object.c')
-rw-r--r-- | drivers/gpu/drm/drm_mode_object.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c index 2ab8ccf2ca98..2eb0792dfaf3 100644 --- a/drivers/gpu/drm/drm_mode_object.c +++ b/drivers/gpu/drm/drm_mode_object.c | |||
@@ -133,7 +133,7 @@ struct drm_mode_object *__drm_mode_object_find(struct drm_device *dev, | |||
133 | * | 133 | * |
134 | * This function is used to look up a modeset object. It will acquire a | 134 | * This function is used to look up a modeset object. It will acquire a |
135 | * reference for reference counted objects. This reference must be dropped again | 135 | * reference for reference counted objects. This reference must be dropped again |
136 | * by callind drm_mode_object_unreference(). | 136 | * by callind drm_mode_object_put(). |
137 | */ | 137 | */ |
138 | struct drm_mode_object *drm_mode_object_find(struct drm_device *dev, | 138 | struct drm_mode_object *drm_mode_object_find(struct drm_device *dev, |
139 | uint32_t id, uint32_t type) | 139 | uint32_t id, uint32_t type) |
@@ -146,38 +146,38 @@ struct drm_mode_object *drm_mode_object_find(struct drm_device *dev, | |||
146 | EXPORT_SYMBOL(drm_mode_object_find); | 146 | EXPORT_SYMBOL(drm_mode_object_find); |
147 | 147 | ||
148 | /** | 148 | /** |
149 | * drm_mode_object_unreference - decr the object refcnt | 149 | * drm_mode_object_put - release a mode object reference |
150 | * @obj: mode_object | 150 | * @obj: DRM mode object |
151 | * | 151 | * |
152 | * This function decrements the object's refcount if it is a refcounted modeset | 152 | * This function decrements the object's refcount if it is a refcounted modeset |
153 | * object. It is a no-op on any other object. This is used to drop references | 153 | * object. It is a no-op on any other object. This is used to drop references |
154 | * acquired with drm_mode_object_reference(). | 154 | * acquired with drm_mode_object_get(). |
155 | */ | 155 | */ |
156 | void drm_mode_object_unreference(struct drm_mode_object *obj) | 156 | void drm_mode_object_put(struct drm_mode_object *obj) |
157 | { | 157 | { |
158 | if (obj->free_cb) { | 158 | if (obj->free_cb) { |
159 | DRM_DEBUG("OBJ ID: %d (%d)\n", obj->id, atomic_read(&obj->refcount.refcount)); | 159 | DRM_DEBUG("OBJ ID: %d (%d)\n", obj->id, atomic_read(&obj->refcount.refcount)); |
160 | kref_put(&obj->refcount, obj->free_cb); | 160 | kref_put(&obj->refcount, obj->free_cb); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | EXPORT_SYMBOL(drm_mode_object_unreference); | 163 | EXPORT_SYMBOL(drm_mode_object_put); |
164 | 164 | ||
165 | /** | 165 | /** |
166 | * drm_mode_object_reference - incr the object refcnt | 166 | * drm_mode_object_get - acquire a mode object reference |
167 | * @obj: mode_object | 167 | * @obj: DRM mode object |
168 | * | 168 | * |
169 | * This function increments the object's refcount if it is a refcounted modeset | 169 | * This function increments the object's refcount if it is a refcounted modeset |
170 | * object. It is a no-op on any other object. References should be dropped again | 170 | * object. It is a no-op on any other object. References should be dropped again |
171 | * by calling drm_mode_object_unreference(). | 171 | * by calling drm_mode_object_put(). |
172 | */ | 172 | */ |
173 | void drm_mode_object_reference(struct drm_mode_object *obj) | 173 | void drm_mode_object_get(struct drm_mode_object *obj) |
174 | { | 174 | { |
175 | if (obj->free_cb) { | 175 | if (obj->free_cb) { |
176 | DRM_DEBUG("OBJ ID: %d (%d)\n", obj->id, atomic_read(&obj->refcount.refcount)); | 176 | DRM_DEBUG("OBJ ID: %d (%d)\n", obj->id, atomic_read(&obj->refcount.refcount)); |
177 | kref_get(&obj->refcount); | 177 | kref_get(&obj->refcount); |
178 | } | 178 | } |
179 | } | 179 | } |
180 | EXPORT_SYMBOL(drm_mode_object_reference); | 180 | EXPORT_SYMBOL(drm_mode_object_get); |
181 | 181 | ||
182 | /** | 182 | /** |
183 | * drm_object_attach_property - attach a property to a modeset object | 183 | * drm_object_attach_property - attach a property to a modeset object |
@@ -363,7 +363,7 @@ int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data, | |||
363 | &arg->count_props); | 363 | &arg->count_props); |
364 | 364 | ||
365 | out_unref: | 365 | out_unref: |
366 | drm_mode_object_unreference(obj); | 366 | drm_mode_object_put(obj); |
367 | out: | 367 | out: |
368 | drm_modeset_unlock_all(dev); | 368 | drm_modeset_unlock_all(dev); |
369 | return ret; | 369 | return ret; |
@@ -428,7 +428,7 @@ int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data, | |||
428 | drm_property_change_valid_put(property, ref); | 428 | drm_property_change_valid_put(property, ref); |
429 | 429 | ||
430 | out_unref: | 430 | out_unref: |
431 | drm_mode_object_unreference(arg_obj); | 431 | drm_mode_object_put(arg_obj); |
432 | out: | 432 | out: |
433 | drm_modeset_unlock_all(dev); | 433 | drm_modeset_unlock_all(dev); |
434 | return ret; | 434 | return ret; |