summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500
diff options
context:
space:
mode:
authorGuobin Huang <huangguobin4@huawei.com>2021-04-06 19:55:14 +0800
committerDaniel Vetter <daniel.vetter@ffwll.ch>2021-04-08 13:19:56 +0200
commit13e133ea1a6b864f16663c3f8941f33e25593de3 (patch)
treed28625545deb091d3519c269113b6d790530b658 /drivers/gpu/drm/gma500
parent2552fb66ae301f490ea37f64d2cdc5778ae61874 (diff)
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 <hulkci@huawei.com> Signed-off-by: Guobin Huang <huangguobin4@huawei.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1617710114-48071-1-git-send-email-huangguobin4@huawei.com
Diffstat (limited to 'drivers/gpu/drm/gma500')
-rw-r--r--drivers/gpu/drm/gma500/power.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/gma500/power.c b/drivers/gpu/drm/gma500/power.c
index 56ef88237ef6..f07641dfa5a4 100644
--- a/drivers/gpu/drm/gma500/power.c
+++ b/drivers/gpu/drm/gma500/power.c
@@ -36,7 +36,7 @@
#include <linux/pm_runtime.h>
static struct mutex power_mutex; /* Serialize power ops */
-static spinlock_t power_ctrl_lock; /* Serialize power claim */
+static DEFINE_SPINLOCK(power_ctrl_lock); /* Serialize power claim */
/**
* gma_power_init - initialise power manager
@@ -55,7 +55,6 @@ void gma_power_init(struct drm_device *dev)
dev_priv->display_power = true; /* We start active */
dev_priv->display_count = 0; /* Currently no users */
dev_priv->suspended = false; /* And not suspended */
- spin_lock_init(&power_ctrl_lock);
mutex_init(&power_mutex);
if (dev_priv->ops->init_pm)