Skip to content

Commit 13e133e

Browse files
Guobin Huangdanvet
authored andcommitted
gma500: Use DEFINE_SPINLOCK() for spinlock
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot <[email protected]> Signed-off-by: Guobin Huang <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2552fb6 commit 13e133e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/gma500/power.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <linux/pm_runtime.h>
3737

3838
static struct mutex power_mutex; /* Serialize power ops */
39-
static spinlock_t power_ctrl_lock; /* Serialize power claim */
39+
static DEFINE_SPINLOCK(power_ctrl_lock); /* Serialize power claim */
4040

4141
/**
4242
* gma_power_init - initialise power manager
@@ -55,7 +55,6 @@ void gma_power_init(struct drm_device *dev)
5555
dev_priv->display_power = true; /* We start active */
5656
dev_priv->display_count = 0; /* Currently no users */
5757
dev_priv->suspended = false; /* And not suspended */
58-
spin_lock_init(&power_ctrl_lock);
5958
mutex_init(&power_mutex);
6059

6160
if (dev_priv->ops->init_pm)

0 commit comments

Comments
 (0)