drm: drop drm_vma_entry_t, drm_magic_entry_t
Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
parent
056219e2fa
commit
8fc2fdf4c9
5 changed files with 15 additions and 19 deletions
|
@ -274,22 +274,18 @@ typedef struct drm_ioctl_desc {
|
|||
int flags;
|
||||
} drm_ioctl_desc_t;
|
||||
|
||||
typedef struct drm_devstate {
|
||||
pid_t owner; /**< X server pid holding x_lock */
|
||||
} drm_devstate_t;
|
||||
|
||||
typedef struct drm_magic_entry {
|
||||
struct drm_magic_entry {
|
||||
struct list_head head;
|
||||
drm_hash_item_t hash_item;
|
||||
struct drm_file *priv;
|
||||
struct drm_magic_entry *next;
|
||||
} drm_magic_entry_t;
|
||||
};
|
||||
|
||||
typedef struct drm_vma_entry {
|
||||
struct drm_vma_entry {
|
||||
struct list_head head;
|
||||
struct vm_area_struct *vma;
|
||||
pid_t pid;
|
||||
} drm_vma_entry_t;
|
||||
};
|
||||
|
||||
/**
|
||||
* DMA buffer.
|
||||
|
|
|
@ -48,12 +48,12 @@
|
|||
static struct drm_file *drm_find_file(struct drm_device * dev, drm_magic_t magic)
|
||||
{
|
||||
struct drm_file *retval = NULL;
|
||||
drm_magic_entry_t *pt;
|
||||
struct drm_magic_entry *pt;
|
||||
drm_hash_item_t *hash;
|
||||
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
if (!drm_ht_find_item(&dev->magiclist, (unsigned long)magic, &hash)) {
|
||||
pt = drm_hash_entry(hash, drm_magic_entry_t, hash_item);
|
||||
pt = drm_hash_entry(hash, struct drm_magic_entry, hash_item);
|
||||
retval = pt->priv;
|
||||
}
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
|
@ -74,7 +74,7 @@ static struct drm_file *drm_find_file(struct drm_device * dev, drm_magic_t magic
|
|||
static int drm_add_magic(struct drm_device * dev, struct drm_file * priv,
|
||||
drm_magic_t magic)
|
||||
{
|
||||
drm_magic_entry_t *entry;
|
||||
struct drm_magic_entry *entry;
|
||||
|
||||
DRM_DEBUG("%d\n", magic);
|
||||
|
||||
|
@ -104,7 +104,7 @@ static int drm_add_magic(struct drm_device * dev, struct drm_file * priv,
|
|||
*/
|
||||
static int drm_remove_magic(struct drm_device * dev, drm_magic_t magic)
|
||||
{
|
||||
drm_magic_entry_t *pt;
|
||||
struct drm_magic_entry *pt;
|
||||
drm_hash_item_t *hash;
|
||||
|
||||
DRM_DEBUG("%d\n", magic);
|
||||
|
@ -114,7 +114,7 @@ static int drm_remove_magic(struct drm_device * dev, drm_magic_t magic)
|
|||
mutex_unlock(&dev->struct_mutex);
|
||||
return -EINVAL;
|
||||
}
|
||||
pt = drm_hash_entry(hash, drm_magic_entry_t, hash_item);
|
||||
pt = drm_hash_entry(hash, struct drm_magic_entry, hash_item);
|
||||
drm_ht_remove_item(&dev->magiclist, hash);
|
||||
list_del(&pt->head);
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
|
|
|
@ -131,9 +131,9 @@ static drm_ioctl_desc_t drm_ioctls[] = {
|
|||
*/
|
||||
int drm_lastclose(struct drm_device * dev)
|
||||
{
|
||||
drm_magic_entry_t *pt, *next;
|
||||
struct drm_magic_entry *pt, *next;
|
||||
drm_map_list_t *r_list, *list_t;
|
||||
drm_vma_entry_t *vma, *vma_temp;
|
||||
struct drm_vma_entry *vma, *vma_temp;
|
||||
int i;
|
||||
|
||||
DRM_DEBUG("\n");
|
||||
|
|
|
@ -478,7 +478,7 @@ static int drm__vma_info(char *buf, char **start, off_t offset, int request,
|
|||
{
|
||||
struct drm_device *dev = (struct drm_device *) data;
|
||||
int len = 0;
|
||||
drm_vma_entry_t *pt;
|
||||
struct drm_vma_entry *pt;
|
||||
struct vm_area_struct *vma;
|
||||
#if defined(__i386__)
|
||||
unsigned int pgprot;
|
||||
|
|
|
@ -196,7 +196,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
|
|||
{
|
||||
struct drm_file *priv = vma->vm_file->private_data;
|
||||
struct drm_device *dev = priv->head->dev;
|
||||
drm_vma_entry_t *pt, *temp;
|
||||
struct drm_vma_entry *pt, *temp;
|
||||
struct drm_map *map;
|
||||
drm_map_list_t *r_list;
|
||||
int found_maps = 0;
|
||||
|
@ -407,7 +407,7 @@ static void drm_vm_open_locked(struct vm_area_struct *vma)
|
|||
{
|
||||
struct drm_file *priv = vma->vm_file->private_data;
|
||||
struct drm_device *dev = priv->head->dev;
|
||||
drm_vma_entry_t *vma_entry;
|
||||
struct drm_vma_entry *vma_entry;
|
||||
|
||||
DRM_DEBUG("0x%08lx,0x%08lx\n",
|
||||
vma->vm_start, vma->vm_end - vma->vm_start);
|
||||
|
@ -443,7 +443,7 @@ static void drm_vm_close(struct vm_area_struct *vma)
|
|||
{
|
||||
struct drm_file *priv = vma->vm_file->private_data;
|
||||
struct drm_device *dev = priv->head->dev;
|
||||
drm_vma_entry_t *pt, *temp;
|
||||
struct drm_vma_entry *pt, *temp;
|
||||
|
||||
DRM_DEBUG("0x%08lx,0x%08lx\n",
|
||||
vma->vm_start, vma->vm_end - vma->vm_start);
|
||||
|
|
Loading…
Reference in a new issue