aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/drm_lock.c')
-rw-r--r--drivers/char/drm/drm_lock.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/char/drm/drm_lock.c b/drivers/char/drm/drm_lock.c
index befd1af19dfe..c0534b5a8b78 100644
--- a/drivers/char/drm/drm_lock.c
+++ b/drivers/char/drm/drm_lock.c
@@ -51,15 +51,15 @@ static int drm_notifier(void *priv);
51int drm_lock(struct inode *inode, struct file *filp, 51int drm_lock(struct inode *inode, struct file *filp,
52 unsigned int cmd, unsigned long arg) 52 unsigned int cmd, unsigned long arg)
53{ 53{
54 drm_file_t *priv = filp->private_data; 54 struct drm_file *priv = filp->private_data;
55 drm_device_t *dev = priv->head->dev; 55 struct drm_device *dev = priv->head->dev;
56 DECLARE_WAITQUEUE(entry, current); 56 DECLARE_WAITQUEUE(entry, current);
57 drm_lock_t lock; 57 struct drm_lock lock;
58 int ret = 0; 58 int ret = 0;
59 59
60 ++priv->lock_count; 60 ++priv->lock_count;
61 61
62 if (copy_from_user(&lock, (drm_lock_t __user *) arg, sizeof(lock))) 62 if (copy_from_user(&lock, (struct drm_lock __user *) arg, sizeof(lock)))
63 return -EFAULT; 63 return -EFAULT;
64 64
65 if (lock.context == DRM_KERNEL_CONTEXT) { 65 if (lock.context == DRM_KERNEL_CONTEXT) {
@@ -152,12 +152,12 @@ int drm_lock(struct inode *inode, struct file *filp,
152int drm_unlock(struct inode *inode, struct file *filp, 152int drm_unlock(struct inode *inode, struct file *filp,
153 unsigned int cmd, unsigned long arg) 153 unsigned int cmd, unsigned long arg)
154{ 154{
155 drm_file_t *priv = filp->private_data; 155 struct drm_file *priv = filp->private_data;
156 drm_device_t *dev = priv->head->dev; 156 struct drm_device *dev = priv->head->dev;
157 drm_lock_t lock; 157 struct drm_lock lock;
158 unsigned long irqflags; 158 unsigned long irqflags;
159 159
160 if (copy_from_user(&lock, (drm_lock_t __user *) arg, sizeof(lock))) 160 if (copy_from_user(&lock, (struct drm_lock __user *) arg, sizeof(lock)))
161 return -EFAULT; 161 return -EFAULT;
162 162
163 if (lock.context == DRM_KERNEL_CONTEXT) { 163 if (lock.context == DRM_KERNEL_CONTEXT) {
@@ -202,7 +202,7 @@ int drm_unlock(struct inode *inode, struct file *filp,
202 * 202 *
203 * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction. 203 * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction.
204 */ 204 */
205int drm_lock_take(drm_lock_data_t *lock_data, 205int drm_lock_take(struct drm_lock_data *lock_data,
206 unsigned int context) 206 unsigned int context)
207{ 207{
208 unsigned int old, new, prev; 208 unsigned int old, new, prev;
@@ -251,7 +251,7 @@ int drm_lock_take(drm_lock_data_t *lock_data,
251 * Resets the lock file pointer. 251 * Resets the lock file pointer.
252 * Marks the lock as held by the given context, via the \p cmpxchg instruction. 252 * Marks the lock as held by the given context, via the \p cmpxchg instruction.
253 */ 253 */
254static int drm_lock_transfer(drm_lock_data_t *lock_data, 254static int drm_lock_transfer(struct drm_lock_data *lock_data,
255 unsigned int context) 255 unsigned int context)
256{ 256{
257 unsigned int old, new, prev; 257 unsigned int old, new, prev;
@@ -277,7 +277,7 @@ static int drm_lock_transfer(drm_lock_data_t *lock_data,
277 * Marks the lock as not held, via the \p cmpxchg instruction. Wakes any task 277 * Marks the lock as not held, via the \p cmpxchg instruction. Wakes any task
278 * waiting on the lock queue. 278 * waiting on the lock queue.
279 */ 279 */
280int drm_lock_free(drm_lock_data_t *lock_data, unsigned int context) 280int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context)
281{ 281{
282 unsigned int old, new, prev; 282 unsigned int old, new, prev;
283 volatile unsigned int *lock = &lock_data->hw_lock->lock; 283 volatile unsigned int *lock = &lock_data->hw_lock->lock;
@@ -319,7 +319,7 @@ int drm_lock_free(drm_lock_data_t *lock_data, unsigned int context)
319 */ 319 */
320static int drm_notifier(void *priv) 320static int drm_notifier(void *priv)
321{ 321{
322 drm_sigdata_t *s = (drm_sigdata_t *) priv; 322 struct drm_sigdata *s = (struct drm_sigdata *) priv;
323 unsigned int old, new, prev; 323 unsigned int old, new, prev;
324 324
325 /* Allow signal delivery if lock isn't held */ 325 /* Allow signal delivery if lock isn't held */
@@ -350,7 +350,7 @@ static int drm_notifier(void *priv)
350 * having to worry about starvation. 350 * having to worry about starvation.
351 */ 351 */
352 352
353void drm_idlelock_take(drm_lock_data_t *lock_data) 353void drm_idlelock_take(struct drm_lock_data *lock_data)
354{ 354{
355 int ret = 0; 355 int ret = 0;
356 356
@@ -369,7 +369,7 @@ void drm_idlelock_take(drm_lock_data_t *lock_data)
369} 369}
370EXPORT_SYMBOL(drm_idlelock_take); 370EXPORT_SYMBOL(drm_idlelock_take);
371 371
372void drm_idlelock_release(drm_lock_data_t *lock_data) 372void drm_idlelock_release(struct drm_lock_data *lock_data)
373{ 373{
374 unsigned int old, prev; 374 unsigned int old, prev;
375 volatile unsigned int *lock = &lock_data->hw_lock->lock; 375 volatile unsigned int *lock = &lock_data->hw_lock->lock;