drm: remove drm_ref_t
parent
24311d5d82
commit
191c062933
|
@ -387,11 +387,11 @@ struct drm_buf_entry {
|
|||
*/
|
||||
|
||||
#define DRM_FILE_HASH_ORDER 8
|
||||
typedef enum{
|
||||
enum drm_ref_type {
|
||||
_DRM_REF_USE=0,
|
||||
_DRM_REF_TYPE1,
|
||||
_DRM_NO_REF_TYPES
|
||||
} drm_ref_t;
|
||||
};
|
||||
|
||||
|
||||
/** File private data */
|
||||
|
|
|
@ -1217,7 +1217,7 @@ static int drm_buffer_object_unmap(struct drm_file * priv, uint32_t handle)
|
|||
|
||||
static void drm_buffer_user_object_unmap(struct drm_file * priv,
|
||||
struct drm_user_object * uo,
|
||||
drm_ref_t action)
|
||||
enum drm_ref_type action)
|
||||
{
|
||||
struct drm_buffer_object *bo =
|
||||
drm_user_object_entry(uo, struct drm_buffer_object, base);
|
||||
|
|
|
@ -106,7 +106,7 @@ int drm_remove_user_object(struct drm_file * priv, struct drm_user_object * item
|
|||
}
|
||||
|
||||
static int drm_object_ref_action(struct drm_file * priv, struct drm_user_object * ro,
|
||||
drm_ref_t action)
|
||||
enum drm_ref_type action)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
@ -125,7 +125,7 @@ static int drm_object_ref_action(struct drm_file * priv, struct drm_user_object
|
|||
}
|
||||
|
||||
int drm_add_ref_object(struct drm_file * priv, struct drm_user_object * referenced_object,
|
||||
drm_ref_t ref_action)
|
||||
enum drm_ref_type ref_action)
|
||||
{
|
||||
int ret = 0;
|
||||
struct drm_ref_object *item;
|
||||
|
@ -183,7 +183,7 @@ int drm_add_ref_object(struct drm_file * priv, struct drm_user_object * referenc
|
|||
|
||||
struct drm_ref_object *drm_lookup_ref_object(struct drm_file * priv,
|
||||
struct drm_user_object * referenced_object,
|
||||
drm_ref_t ref_action)
|
||||
enum drm_ref_type ref_action)
|
||||
{
|
||||
struct drm_hash_item *hash;
|
||||
int ret;
|
||||
|
@ -219,7 +219,7 @@ void drm_remove_ref_object(struct drm_file * priv, struct drm_ref_object * item)
|
|||
int ret;
|
||||
struct drm_user_object *user_object = (struct drm_user_object *) item->hash.key;
|
||||
struct drm_open_hash *ht = &priv->refd_object_hash[item->unref_action];
|
||||
drm_ref_t unref_action;
|
||||
enum drm_ref_type unref_action;
|
||||
|
||||
DRM_ASSERT_LOCKED(&priv->head->dev->struct_mutex);
|
||||
unref_action = item->unref_action;
|
||||
|
|
|
@ -64,9 +64,9 @@ struct drm_user_object {
|
|||
struct drm_file *owner;
|
||||
void (*ref_struct_locked) (struct drm_file * priv,
|
||||
struct drm_user_object * obj,
|
||||
drm_ref_t ref_action);
|
||||
enum drm_ref_type ref_action);
|
||||
void (*unref) (struct drm_file * priv, struct drm_user_object * obj,
|
||||
drm_ref_t unref_action);
|
||||
enum drm_ref_type unref_action);
|
||||
void (*remove) (struct drm_file * priv, struct drm_user_object * obj);
|
||||
};
|
||||
|
||||
|
@ -81,7 +81,7 @@ struct drm_ref_object {
|
|||
struct drm_hash_item hash;
|
||||
struct list_head list;
|
||||
atomic_t refcount;
|
||||
drm_ref_t unref_action;
|
||||
enum drm_ref_type unref_action;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -112,7 +112,7 @@ extern int drm_remove_user_object(struct drm_file * priv, struct drm_user_object
|
|||
|
||||
extern int drm_add_ref_object(struct drm_file * priv,
|
||||
struct drm_user_object * referenced_object,
|
||||
drm_ref_t ref_action);
|
||||
enum drm_ref_type ref_action);
|
||||
|
||||
/*
|
||||
* Must be called with the struct_mutex held.
|
||||
|
@ -120,7 +120,7 @@ extern int drm_add_ref_object(struct drm_file * priv,
|
|||
|
||||
struct drm_ref_object *drm_lookup_ref_object(struct drm_file * priv,
|
||||
struct drm_user_object * referenced_object,
|
||||
drm_ref_t ref_action);
|
||||
enum drm_ref_type ref_action);
|
||||
/*
|
||||
* Must be called with the struct_mutex held.
|
||||
* If "item" has been obtained by a call to drm_lookup_ref_object. You may not
|
||||
|
|
Loading…
Reference in New Issue