Commit c60ce623 authored by Dave Airlie's avatar Dave Airlie
Browse files

drm: remove a bunch of typedefs on the userspace interface



This moves a bunch of typedefs into a !defined __KERNEL__ to keep userspace
API compatiblity, it changes all internal usages to structs/enum/unions.
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent c6c656b4
This diff is collapsed.
......@@ -395,7 +395,7 @@ typedef struct drm_queue {
atomic_t total_flushed; /**< Total flushes statistic */
atomic_t total_locks; /**< Total locks statistics */
#endif
drm_ctx_flags_t flags; /**< Context preserving and 2D-only */
enum drm_ctx_flags flags; /**< Context preserving and 2D-only */
drm_waitlist_t waitlist; /**< Pending buffers */
wait_queue_head_t flush_queue; /**< Processes waiting until flush */
} drm_queue_t;
......@@ -404,7 +404,7 @@ typedef struct drm_queue {
* Lock data.
*/
typedef struct drm_lock_data {
drm_hw_lock_t *hw_lock; /**< Hardware lock */
struct drm_hw_lock *hw_lock; /**< Hardware lock */
struct file *filp; /**< File descr of lock holder (0=kernel) */
wait_queue_head_t lock_queue; /**< Queue of blocked processes */
unsigned long lock_time; /**< Time of last lock in jiffies */
......@@ -477,7 +477,7 @@ typedef struct drm_sg_mem {
typedef struct drm_sigdata {
int context;
drm_hw_lock_t *lock;
struct drm_hw_lock *lock;
} drm_sigdata_t;
/**
......@@ -486,11 +486,11 @@ typedef struct drm_sigdata {
typedef struct drm_map_list {
struct list_head head; /**< list head */
drm_hash_item_t hash;
drm_map_t *map; /**< mapping */
struct drm_map *map; /**< mapping */
unsigned int user_token;
} drm_map_list_t;
typedef drm_map_t drm_local_map_t;
typedef struct drm_map drm_local_map_t;
/**
* Context handle list
......@@ -594,9 +594,10 @@ struct drm_driver {
struct file *filp);
void (*reclaim_buffers_idlelocked) (struct drm_device *dev,
struct file * filp);
unsigned long (*get_map_ofs) (drm_map_t * map);
unsigned long (*get_map_ofs) (struct drm_map * map);
unsigned long (*get_reg_ofs) (struct drm_device * dev);
void (*set_version) (struct drm_device * dev, drm_set_version_t * sv);
void (*set_version) (struct drm_device * dev,
struct drm_set_version *sv);
int major;
int minor;
......@@ -656,7 +657,7 @@ typedef struct drm_device {
/** \name Performance counters */
/*@{ */
unsigned long counters;
drm_stat_type_t types[15];
enum drm_stat_type types[15];
atomic_t counts[15];
/*@} */
......@@ -679,7 +680,7 @@ typedef struct drm_device {
int ctx_count; /**< Number of context handles */
struct mutex ctxlist_mutex; /**< For ctxlist */
drm_map_t **context_sareas; /**< per-context SAREA's */
struct drm_map **context_sareas; /**< per-context SAREA's */
int max_context;
struct list_head vmalist; /**< List of vmas (for debugging) */
......@@ -756,7 +757,7 @@ typedef struct drm_device {
unsigned int drw_bitfield_length;
u32 *drw_bitfield;
unsigned int drw_info_length;
drm_drawable_info_t **drw_info;
struct drm_drawable_info **drw_info;
/*@} */
} drm_device_t;
......@@ -904,7 +905,7 @@ extern int drm_rmdraw(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_update_drawable_info(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern drm_drawable_info_t *drm_get_drawable_info(drm_device_t *dev,
extern struct drm_drawable_info *drm_get_drawable_info(drm_device_t *dev,
drm_drawable_t id);
/* Authentication IOCTL support (drm_auth.h) */
......@@ -932,11 +933,11 @@ extern int drm_i_have_hw_lock(struct file *filp);
extern int drm_kernel_take_hw_lock(struct file *filp);
/* Buffer management support (drm_bufs.h) */
extern int drm_addbufs_agp(drm_device_t * dev, drm_buf_desc_t * request);
extern int drm_addbufs_pci(drm_device_t * dev, drm_buf_desc_t * request);
extern int drm_addbufs_agp(drm_device_t * dev, struct drm_buf_desc * request);
extern int drm_addbufs_pci(drm_device_t * dev, struct drm_buf_desc * request);
extern int drm_addmap(drm_device_t * dev, unsigned int offset,
unsigned int size, drm_map_type_t type,
drm_map_flags_t flags, drm_local_map_t ** map_ptr);
unsigned int size, enum drm_map_type type,
enum drm_map_flags flags, drm_local_map_t ** map_ptr);
extern int drm_addmap_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_rmmap(drm_device_t * dev, drm_local_map_t * map);
......@@ -989,22 +990,22 @@ extern int drm_agp_acquire_ioctl(struct inode *inode, struct file *filp,
extern int drm_agp_release(drm_device_t * dev);
extern int drm_agp_release_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_agp_enable(drm_device_t * dev, drm_agp_mode_t mode);
extern int drm_agp_enable(drm_device_t * dev, struct drm_agp_mode mode);
extern int drm_agp_enable_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_agp_info(drm_device_t * dev, drm_agp_info_t * info);
extern int drm_agp_info(drm_device_t * dev, struct drm_agp_info * info);
extern int drm_agp_info_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_agp_alloc(drm_device_t *dev, drm_agp_buffer_t *request);
extern int drm_agp_alloc(drm_device_t *dev, struct drm_agp_buffer *request);
extern int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_agp_free(drm_device_t *dev, drm_agp_buffer_t *request);
extern int drm_agp_free(drm_device_t *dev, struct drm_agp_buffer *request);
extern int drm_agp_free_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_agp_unbind(drm_device_t *dev, drm_agp_binding_t *request);
extern int drm_agp_unbind(drm_device_t *dev, struct drm_agp_binding *request);
extern int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_agp_bind(drm_device_t *dev, drm_agp_binding_t *request);
extern int drm_agp_bind(drm_device_t *dev, struct drm_agp_binding *request);
extern int drm_agp_bind_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge,
......@@ -1137,7 +1138,7 @@ extern void *drm_calloc(size_t nmemb, size_t size, int area);
/*@}*/
extern unsigned long drm_core_get_map_ofs(drm_map_t * map);
extern unsigned long drm_core_get_map_ofs(struct drm_map * map);
extern unsigned long drm_core_get_reg_ofs(struct drm_device *dev);
#endif /* __KERNEL__ */
......
......@@ -48,7 +48,7 @@
* Verifies the AGP device has been initialized and acquired and fills in the
* drm_agp_info structure with the information in drm_agp_head::agp_info.
*/
int drm_agp_info(drm_device_t * dev, drm_agp_info_t * info)
int drm_agp_info(drm_device_t * dev, struct drm_agp_info * info)
{
DRM_AGP_KERN *kern;
......@@ -76,14 +76,14 @@ int drm_agp_info_ioctl(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_agp_info_t info;
struct drm_agp_info info;
int err;
err = drm_agp_info(dev, &info);
if (err)
return err;
if (copy_to_user((drm_agp_info_t __user *) arg, &info, sizeof(info)))
if (copy_to_user((struct drm_agp_info __user *) arg, &info, sizeof(info)))
return -EFAULT;
return 0;
}
......@@ -168,7 +168,7 @@ int drm_agp_release_ioctl(struct inode *inode, struct file *filp,
* Verifies the AGP device has been acquired but not enabled, and calls
* \c agp_enable.
*/
int drm_agp_enable(drm_device_t * dev, drm_agp_mode_t mode)
int drm_agp_enable(drm_device_t * dev, struct drm_agp_mode mode)
{
if (!dev->agp || !dev->agp->acquired)
return -EINVAL;
......@@ -187,9 +187,9 @@ int drm_agp_enable_ioctl(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_agp_mode_t mode;
struct drm_agp_mode mode;
if (copy_from_user(&mode, (drm_agp_mode_t __user *) arg, sizeof(mode)))
if (copy_from_user(&mode, (struct drm_agp_mode __user *) arg, sizeof(mode)))
return -EFAULT;
return drm_agp_enable(dev, mode);
......@@ -207,7 +207,7 @@ int drm_agp_enable_ioctl(struct inode *inode, struct file *filp,
* Verifies the AGP device is present and has been acquired, allocates the
* memory via alloc_agp() and creates a drm_agp_mem entry for it.
*/
int drm_agp_alloc(drm_device_t *dev, drm_agp_buffer_t *request)
int drm_agp_alloc(drm_device_t *dev, struct drm_agp_buffer *request)
{
drm_agp_mem_t *entry;
DRM_AGP_MEM *memory;
......@@ -246,8 +246,8 @@ int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_agp_buffer_t request;
drm_agp_buffer_t __user *argp = (void __user *)arg;
struct drm_agp_buffer request;
struct drm_agp_buffer __user *argp = (void __user *)arg;
int err;
if (copy_from_user(&request, argp, sizeof(request)))
......@@ -305,7 +305,7 @@ static drm_agp_mem_t *drm_agp_lookup_entry(drm_device_t * dev,
* Verifies the AGP device is present and acquired, looks-up the AGP memory
* entry and passes it to the unbind_agp() function.
*/
int drm_agp_unbind(drm_device_t *dev, drm_agp_binding_t *request)
int drm_agp_unbind(drm_device_t *dev, struct drm_agp_binding *request)
{
drm_agp_mem_t *entry;
int ret;
......@@ -328,10 +328,10 @@ int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_agp_binding_t request;
struct drm_agp_binding request;
if (copy_from_user
(&request, (drm_agp_binding_t __user *) arg, sizeof(request)))
(&request, (struct drm_agp_binding __user *) arg, sizeof(request)))
return -EFAULT;
return drm_agp_unbind(dev, &request);
......@@ -350,7 +350,7 @@ int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp,
* is currently bound into the GATT. Looks-up the AGP memory entry and passes
* it to bind_agp() function.
*/
int drm_agp_bind(drm_device_t *dev, drm_agp_binding_t *request)
int drm_agp_bind(drm_device_t *dev, struct drm_agp_binding *request)
{
drm_agp_mem_t *entry;
int retcode;
......@@ -377,10 +377,10 @@ int drm_agp_bind_ioctl(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_agp_binding_t request;
struct drm_agp_binding request;
if (copy_from_user
(&request, (drm_agp_binding_t __user *) arg, sizeof(request)))
(&request, (struct drm_agp_binding __user *) arg, sizeof(request)))
return -EFAULT;
return drm_agp_bind(dev, &request);
......@@ -400,7 +400,7 @@ int drm_agp_bind_ioctl(struct inode *inode, struct file *filp,
* unbind_agp(). Frees it via free_agp() as well as the entry itself
* and unlinks from the doubly linked list it's inserted in.
*/
int drm_agp_free(drm_device_t *dev, drm_agp_buffer_t *request)
int drm_agp_free(drm_device_t *dev, struct drm_agp_buffer *request)
{
drm_agp_mem_t *entry;
......@@ -424,10 +424,10 @@ int drm_agp_free_ioctl(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_agp_buffer_t request;
struct drm_agp_buffer request;
if (copy_from_user
(&request, (drm_agp_buffer_t __user *) arg, sizeof(request)))
(&request, (struct drm_agp_buffer __user *) arg, sizeof(request)))
return -EFAULT;
return drm_agp_free(dev, &request);
......
......@@ -144,7 +144,7 @@ int drm_getmagic(struct inode *inode, struct file *filp,
static DEFINE_SPINLOCK(lock);
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_auth_t auth;
struct drm_auth auth;
/* Find unique magic */
if (priv->magic) {
......@@ -162,7 +162,7 @@ int drm_getmagic(struct inode *inode, struct file *filp,
}
DRM_DEBUG("%u\n", auth.magic);
if (copy_to_user((drm_auth_t __user *) arg, &auth, sizeof(auth)))
if (copy_to_user((struct drm_auth __user *) arg, &auth, sizeof(auth)))
return -EFAULT;
return 0;
}
......@@ -183,10 +183,10 @@ int drm_authmagic(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_auth_t auth;
struct drm_auth auth;
drm_file_t *file;
if (copy_from_user(&auth, (drm_auth_t __user *) arg, sizeof(auth)))
if (copy_from_user(&auth, (struct drm_auth __user *) arg, sizeof(auth)))
return -EFAULT;
DRM_DEBUG("%u\n", auth.magic);
if ((file = drm_find_file(dev, auth.magic))) {
......
......@@ -102,10 +102,10 @@ static int drm_map_handle(drm_device_t *dev, drm_hash_item_t *hash,
* applicable and if supported by the kernel.
*/
static int drm_addmap_core(drm_device_t * dev, unsigned int offset,
unsigned int size, drm_map_type_t type,
drm_map_flags_t flags, drm_map_list_t ** maplist)
unsigned int size, enum drm_map_type type,
enum drm_map_flags flags, drm_map_list_t ** maplist)
{
drm_map_t *map;
struct drm_map *map;
drm_map_list_t *list;
drm_dma_handle_t *dmah;
unsigned long user_token;
......@@ -311,8 +311,8 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset,
}
int drm_addmap(drm_device_t * dev, unsigned int offset,
unsigned int size, drm_map_type_t type,
drm_map_flags_t flags, drm_local_map_t ** map_ptr)
unsigned int size, enum drm_map_type type,
enum drm_map_flags flags, drm_local_map_t ** map_ptr)
{
drm_map_list_t *list;
int rc;
......@@ -330,9 +330,9 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_map_t map;
struct drm_map map;
drm_map_list_t *maplist;
drm_map_t __user *argp = (void __user *)arg;
struct drm_map __user *argp = (void __user *)arg;
int err;
if (!(filp->f_mode & 3))
......@@ -351,7 +351,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
if (err)
return err;
if (copy_to_user(argp, maplist->map, sizeof(drm_map_t)))
if (copy_to_user(argp, maplist->map, sizeof(struct drm_map)))
return -EFAULT;
/* avoid a warning on 64-bit, this casting isn't very nice, but the API is set so too late */
......@@ -367,7 +367,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
* \param inode device inode.
* \param filp file pointer.
* \param cmd command.
* \param arg pointer to a drm_map_t structure.
* \param arg pointer to a struct drm_map structure.
* \return zero on success or a negative value on error.
*
* Searches the map on drm_device::maplist, removes it from the list, see if
......@@ -451,12 +451,12 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_map_t request;
struct drm_map request;
drm_local_map_t *map = NULL;
drm_map_list_t *r_list;
int ret;
if (copy_from_user(&request, (drm_map_t __user *) arg, sizeof(request))) {
if (copy_from_user(&request, (struct drm_map __user *) arg, sizeof(request))) {
return -EFAULT;
}
......@@ -542,14 +542,14 @@ static void drm_cleanup_buf_error(drm_device_t * dev, drm_buf_entry_t * entry)
* Add AGP buffers for DMA transfers.
*
* \param dev drm_device_t to which the buffers are to be added.
* \param request pointer to a drm_buf_desc_t describing the request.
* \param request pointer to a struct drm_buf_desc describing the request.
* \return zero on success or a negative number on failure.
*
* After some sanity checks creates a drm_buf structure for each buffer and
* reallocates the buffer list of the same size order to accommodate the new
* buffers.
*/
int drm_addbufs_agp(drm_device_t * dev, drm_buf_desc_t * request)
int drm_addbufs_agp(drm_device_t * dev, struct drm_buf_desc * request)
{
drm_device_dma_t *dma = dev->dma;
drm_buf_entry_t *entry;
......@@ -719,7 +719,7 @@ int drm_addbufs_agp(drm_device_t * dev, drm_buf_desc_t * request)
EXPORT_SYMBOL(drm_addbufs_agp);
#endif /* __OS_HAS_AGP */
int drm_addbufs_pci(drm_device_t * dev, drm_buf_desc_t * request)
int drm_addbufs_pci(drm_device_t * dev, struct drm_buf_desc * request)
{
drm_device_dma_t *dma = dev->dma;
int count;
......@@ -945,7 +945,7 @@ int drm_addbufs_pci(drm_device_t * dev, drm_buf_desc_t * request)
}
EXPORT_SYMBOL(drm_addbufs_pci);
static int drm_addbufs_sg(drm_device_t * dev, drm_buf_desc_t * request)
static int drm_addbufs_sg(drm_device_t * dev, struct drm_buf_desc * request)
{
drm_device_dma_t *dma = dev->dma;
drm_buf_entry_t *entry;
......@@ -1107,7 +1107,7 @@ static int drm_addbufs_sg(drm_device_t * dev, drm_buf_desc_t * request)
return 0;
}
static int drm_addbufs_fb(drm_device_t * dev, drm_buf_desc_t * request)
static int drm_addbufs_fb(drm_device_t * dev, struct drm_buf_desc * request)
{
drm_device_dma_t *dma = dev->dma;
drm_buf_entry_t *entry;
......@@ -1274,7 +1274,7 @@ static int drm_addbufs_fb(drm_device_t * dev, drm_buf_desc_t * request)
* \param inode device inode.
* \param filp file pointer.
* \param cmd command.
* \param arg pointer to a drm_buf_desc_t request.
* \param arg pointer to a struct drm_buf_desc request.
* \return zero on success or a negative number on failure.
*
* According with the memory type specified in drm_buf_desc::flags and the
......@@ -1285,7 +1285,7 @@ static int drm_addbufs_fb(drm_device_t * dev, drm_buf_desc_t * request)
int drm_addbufs(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
{
drm_buf_desc_t request;
struct drm_buf_desc request;
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
int ret;
......@@ -1293,7 +1293,7 @@ int drm_addbufs(struct inode *inode, struct file *filp,
if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
return -EINVAL;
if (copy_from_user(&request, (drm_buf_desc_t __user *) arg,
if (copy_from_user(&request, (struct drm_buf_desc __user *) arg,
sizeof(request)))
return -EFAULT;
......@@ -1340,8 +1340,8 @@ int drm_infobufs(struct inode *inode, struct file *filp,
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_device_dma_t *dma = dev->dma;
drm_buf_info_t request;
drm_buf_info_t __user *argp = (void __user *)arg;
struct drm_buf_info request;
struct drm_buf_info __user *argp = (void __user *)arg;
int i;
int count;
......@@ -1372,7 +1372,7 @@ int drm_infobufs(struct inode *inode, struct file *filp,
if (request.count >= count) {
for (i = 0, count = 0; i < DRM_MAX_ORDER + 1; i++) {
if (dma->bufs[i].buf_count) {
drm_buf_desc_t __user *to =
struct drm_buf_desc __user *to =
&request.list[count];
drm_buf_entry_t *from = &dma->bufs[i];
drm_freelist_t *list = &dma->bufs[i].freelist;
......@@ -1428,7 +1428,7 @@ int drm_markbufs(struct inode *inode, struct file *filp,
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_device_dma_t *dma = dev->dma;
drm_buf_desc_t request;
struct drm_buf_desc request;
int order;
drm_buf_entry_t *entry;
......@@ -1439,7 +1439,7 @@ int drm_markbufs(struct inode *inode, struct file *filp,
return -EINVAL;
if (copy_from_user(&request,
(drm_buf_desc_t __user *) arg, sizeof(request)))
(struct drm_buf_desc __user *) arg, sizeof(request)))
return -EFAULT;
DRM_DEBUG("%d, %d, %d\n",
......@@ -1478,7 +1478,7 @@ int drm_freebufs(struct inode *inode, struct file *filp,
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_device_dma_t *dma = dev->dma;
drm_buf_free_t request;
struct drm_buf_free request;
int i;
int idx;
drm_buf_t *buf;
......@@ -1490,7 +1490,7 @@ int drm_freebufs(struct inode *inode, struct file *filp,
return -EINVAL;
if (copy_from_user(&request,
(drm_buf_free_t __user *) arg, sizeof(request)))
(struct drm_buf_free __user *) arg, sizeof(request)))
return -EFAULT;
DRM_DEBUG("%d\n", request.count);
......@@ -1534,12 +1534,12 @@ int drm_mapbufs(struct inode *inode, struct file *filp,
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_device_dma_t *dma = dev->dma;
drm_buf_map_t __user *argp = (void __user *)arg;
struct drm_buf_map __user *argp = (void __user *)arg;
int retcode = 0;
const int zero = 0;
unsigned long virtual;
unsigned long address;
drm_buf_map_t request;
struct drm_buf_map request;
int i;
if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
......@@ -1565,7 +1565,7 @@ int drm_mapbufs(struct inode *inode, struct file *filp,
&& (dma->flags & _DRM_DMA_USE_SG))
|| (drm_core_check_feature(dev, DRIVER_FB_DMA)
&& (dma->flags & _DRM_DMA_USE_FB))) {
drm_map_t *map = dev->agp_buffer_map;
struct drm_map *map = dev->agp_buffer_map;
unsigned long token = dev->agp_buffer_token;
if (!map) {
......
......@@ -100,7 +100,7 @@ static int drm_ctxbitmap_next(drm_device_t * dev)
if ((bit + 1) > dev->max_context) {
dev->max_context = (bit + 1);
if (dev->context_sareas) {
drm_map_t **ctx_sareas;
struct drm_map **ctx_sareas;
ctx_sareas = drm_realloc(dev->context_sareas,
(dev->max_context -
......@@ -214,9 +214,9 @@ int drm_getsareactx(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_ctx_priv_map_t __user *argp = (void __user *)arg;
drm_ctx_priv_map_t request;
drm_map_t *map;
struct drm_ctx_priv_map __user *argp = (void __user *)arg;
struct drm_ctx_priv_map request;
struct drm_map *map;
drm_map_list_t *_entry;
if (copy_from_user(&request, argp, sizeof(request)))
......@@ -265,12 +265,13 @@ int drm_setsareactx(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_ctx_priv_map_t request;
drm_map_t *map = NULL;
struct drm_ctx_priv_map request;
struct drm_map *map = NULL;
drm_map_list_t *r_list = NULL;
if (copy_from_user(&request,
(drm_ctx_priv_map_t __user *) arg, sizeof(request)))
(struct drm_ctx_priv_map __user *) arg,
sizeof(request)))
return -EFAULT;
mutex_lock(&dev->struct_mutex);
......@@ -370,9 +371,9 @@ static int drm_context_switch_complete(drm_device_t * dev, int new)
int drm_resctx(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
{
drm_ctx_res_t res;
drm_ctx_t __user *argp = (void __user *)arg;
drm_ctx_t ctx;
struct drm_ctx_res res;
struct drm_ctx_res __user *argp = (void __user *)arg;
struct drm_ctx ctx;
int i;
if (copy_from_user(&res, argp, sizeof(res)))
......@@ -410,8 +411,8 @@ int drm_addctx(struct inode *inode, struct file *filp,
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_ctx_list_t *ctx_entry;
drm_ctx_t __user *argp = (void __user *)arg;
drm_ctx_t ctx;
struct drm_ctx __user *argp = (void __user *)arg;
struct drm_ctx ctx;
if (copy_from_user(&ctx, argp, sizeof(ctx)))
return -EFAULT;
......@@ -475,8 +476,8 @@ int drm_modctx(struct inode *inode, struct file *filp,
int drm_getctx(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
{
drm_ctx_t __user *argp = (void __user *)arg;
drm_ctx_t ctx;
struct drm_ctx __user *argp = (void __user *)arg;
struct drm_ctx ctx;
if (copy_from_user(&ctx, argp, sizeof(ctx)))
return -EFAULT;
......@@ -505,9 +506,9 @@ int drm_switchctx(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_ctx_t ctx;
struct drm_ctx ctx;
if (copy_from_user(&ctx, (drm_ctx_t __user *) arg, sizeof(ctx)))
if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx)))
return -EFAULT;
DRM_DEBUG("%d\n", ctx.handle);
......@@ -530,9 +531,9 @@ int drm_newctx(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_ctx_t ctx;
struct drm_ctx ctx;
if (copy_from_user(&ctx, (drm_ctx_t __user *) arg, sizeof(ctx)))
if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx)))
return -EFAULT;
DRM_DEBUG("%d\n", ctx.handle);
......@@ -557,9 +558,9 @@ int drm_rmctx(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->head->dev;
drm_ctx_t