summaryrefslogtreecommitdiff
path: root/linux-core/drm_fops.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-11-22 16:10:36 +1000
committerDave Airlie <airlied@linux.ie>2007-11-22 16:10:36 +1000
commit5dc5c36e624e5393b5427a159ad34e5fc358cc9f (patch)
tree6d76ab39458b843c238f2c69160c16b82245ee44 /linux-core/drm_fops.c
parent7bf05708b686ec8822cc1ac7c8b647d4f7110bff (diff)
drm: major whitespace/coding style realignment with kernel
Diffstat (limited to 'linux-core/drm_fops.c')
-rw-r--r--linux-core/drm_fops.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c
index 2b1c5a08..0e1c486c 100644
--- a/linux-core/drm_fops.c
+++ b/linux-core/drm_fops.c
@@ -152,7 +152,7 @@ int drm_open(struct inode *inode, struct file *filp)
spin_unlock(&dev->count_lock);
}
- out:
+out:
mutex_lock(&dev->struct_mutex);
BUG_ON((dev->dev_mapping != NULL) &&
(dev->dev_mapping != inode->i_mapping));
@@ -236,7 +236,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
int minor = iminor(inode);
struct drm_file *priv;
int ret;
- int i,j;
+ int i, j;
if (filp->f_flags & O_EXCL)
return -EBUSY; /* No exclusive opens */
@@ -264,14 +264,15 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
INIT_LIST_HEAD(&priv->lhead);
INIT_LIST_HEAD(&priv->refd_objects);
- for (i=0; i<_DRM_NO_REF_TYPES; ++i) {
- ret = drm_ht_create(&priv->refd_object_hash[i], DRM_FILE_HASH_ORDER);
+ for (i = 0; i < _DRM_NO_REF_TYPES; ++i) {
+ ret = drm_ht_create(&priv->refd_object_hash[i],
+ DRM_FILE_HASH_ORDER);
if (ret)
break;
}
if (ret) {
- for(j = 0; j < i; ++j)
+ for (j = 0; j < i; ++j)
drm_ht_remove(&priv->refd_object_hash[j]);
goto out_free;
}
@@ -340,8 +341,9 @@ static void drm_object_release(struct file *filp)
/*
* Free leftover ref objects created by me. Note that we cannot use
- * list_for_each() here, as the struct_mutex may be temporarily released
- * by the remove_() functions, and thus the lists may be altered.
+ * list_for_each() here, as the struct_mutex may be temporarily
+ * released by the remove_() functions, and thus the lists may be
+ * altered.
* Also, a drm_remove_ref_object() will not remove it
* from the list unless its refcount is 1.
*/
@@ -353,9 +355,8 @@ static void drm_object_release(struct file *filp)
head = &priv->refd_objects;
}
- for(i = 0; i < _DRM_NO_REF_TYPES; ++i) {
+ for (i = 0; i < _DRM_NO_REF_TYPES; ++i)
drm_ht_remove(&priv->refd_object_hash[i]);
- }
}
/**