Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-01-20 16:20:01 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-20 16:20:01 -0800
commit25768610fb74c37503a5e6aff5257844c1a85d31 (patch)
tree2e185637ecdb96af281443cbfcaca96d3d5ffdec
parent194d058faa7318e32877a5908f43a9a49aad629c (diff)
[PATCH] Lock initializer cleanup: DRM
Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/char/drm/drm_auth.c2
-rw-r--r--drivers/char/drm/drm_memory_debug.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/drm/drm_auth.c b/drivers/char/drm/drm_auth.c
index 84c39f747cf3..777c631cad60 100644
--- a/drivers/char/drm/drm_auth.c
+++ b/drivers/char/drm/drm_auth.c
@@ -174,7 +174,7 @@ int drm_getmagic(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
{
static drm_magic_t sequence = 0;
- static spinlock_t lock = SPIN_LOCK_UNLOCKED;
+ static DEFINE_SPINLOCK(lock);
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev;
drm_auth_t auth;
diff --git a/drivers/char/drm/drm_memory_debug.h b/drivers/char/drm/drm_memory_debug.h
index 8b484ad94d47..2c82e69a7fd2 100644
--- a/drivers/char/drm/drm_memory_debug.h
+++ b/drivers/char/drm/drm_memory_debug.h
@@ -43,7 +43,7 @@ typedef struct drm_mem_stats {
unsigned long bytes_freed;
} drm_mem_stats_t;
-static spinlock_t DRM(mem_lock) = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(DRM(mem_lock));
static unsigned long DRM(ram_available) = 0; /* In pages */
static unsigned long DRM(ram_used) = 0;
static drm_mem_stats_t DRM(mem_stats)[] = {