From 09e51db77b049765117d3cfa8b59fab0b73e6c93 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Sun, 18 Nov 2007 19:16:40 +0100 Subject: drm: don't reset to 0 irq_enabled when client open file descriptor --- linux-core/drm_fops.c | 1 - 1 file changed, 1 deletion(-) (limited to 'linux-core/drm_fops.c') diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c index 6923ce86..2b1c5a08 100644 --- a/linux-core/drm_fops.c +++ b/linux-core/drm_fops.c @@ -85,7 +85,6 @@ static int drm_setup(struct drm_device * dev) dev->queue_reserved = 0; dev->queue_slots = 0; dev->queuelist = NULL; - dev->irq_enabled = 0; dev->context_flag = 0; dev->interrupt_flag = 0; dev->dma_flag = 0; -- cgit v1.2.3 From 5dc5c36e624e5393b5427a159ad34e5fc358cc9f Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 22 Nov 2007 16:10:36 +1000 Subject: drm: major whitespace/coding style realignment with kernel --- linux-core/drm_fops.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'linux-core/drm_fops.c') 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]); - } } /** -- cgit v1.2.3