Commit 25768610 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds

[PATCH] Lock initializer cleanup: DRM

Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 194d058f
...@@ -174,7 +174,7 @@ int drm_getmagic(struct inode *inode, struct file *filp, ...@@ -174,7 +174,7 @@ int drm_getmagic(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
static drm_magic_t sequence = 0; 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_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev; drm_device_t *dev = priv->dev;
drm_auth_t auth; drm_auth_t auth;
......
...@@ -43,7 +43,7 @@ typedef struct drm_mem_stats { ...@@ -43,7 +43,7 @@ typedef struct drm_mem_stats {
unsigned long bytes_freed; unsigned long bytes_freed;
} drm_mem_stats_t; } 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_available) = 0; /* In pages */
static unsigned long DRM(ram_used) = 0; static unsigned long DRM(ram_used) = 0;
static drm_mem_stats_t DRM(mem_stats)[] = { static drm_mem_stats_t DRM(mem_stats)[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment