X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Fdrm%2Fdrm_mode_object.h;h=a767b4a30a6d37704c136c862eabee5417550bb7;hb=e543c8a92fb6eca8dd554561fa55bba5f2a90d09;hp=2c017adf6d744a68a98db117e7d3aef4af69051e;hpb=ccf9fc86d63cbb5c46e96748f1937ce528f49ad2;p=karo-tx-linux.git diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h index 2c017adf6d74..a767b4a30a6d 100644 --- a/include/drm/drm_mode_object.h +++ b/include/drm/drm_mode_object.h @@ -45,10 +45,10 @@ struct drm_device; * drm_object_attach_property() before the object is visible to userspace. * * - For objects with dynamic lifetimes (as indicated by a non-NULL @free_cb) it - * provides reference counting through drm_mode_object_reference() and - * drm_mode_object_unreference(). This is used by &drm_framebuffer, - * &drm_connector and &drm_property_blob. These objects provide specialized - * reference counting wrappers. + * provides reference counting through drm_mode_object_get() and + * drm_mode_object_put(). This is used by &drm_framebuffer, &drm_connector + * and &drm_property_blob. These objects provide specialized reference + * counting wrappers. */ struct drm_mode_object { uint32_t id; @@ -114,8 +114,32 @@ struct drm_object_properties { struct drm_mode_object *drm_mode_object_find(struct drm_device *dev, uint32_t id, uint32_t type); -void drm_mode_object_reference(struct drm_mode_object *obj); -void drm_mode_object_unreference(struct drm_mode_object *obj); +void drm_mode_object_get(struct drm_mode_object *obj); +void drm_mode_object_put(struct drm_mode_object *obj); + +/** + * drm_mode_object_reference - acquire a mode object reference + * @obj: DRM mode object + * + * This is a compatibility alias for drm_mode_object_get() and should not be + * used by new code. + */ +static inline void drm_mode_object_reference(struct drm_mode_object *obj) +{ + drm_mode_object_get(obj); +} + +/** + * drm_mode_object_unreference - release a mode object reference + * @obj: DRM mode object + * + * This is a compatibility alias for drm_mode_object_put() and should not be + * used by new code. + */ +static inline void drm_mode_object_unreference(struct drm_mode_object *obj) +{ + drm_mode_object_put(obj); +} int drm_object_property_set_value(struct drm_mode_object *obj, struct drm_property *property,