* [PATCH -next] gpu: drm: gma500: Use DEFINE_SPINLOCK() for spinlock
@ 2020-12-28 13:51 ` Zheng Yongjun
0 siblings, 0 replies; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-28 13:51 UTC (permalink / raw)
To: patrik.r.jakobsson, airlied, daniel, dri-devel, linux-kernel
Cc: Zheng Yongjun
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/gpu/drm/gma500/power.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/gma500/power.c b/drivers/gpu/drm/gma500/power.c
index b361e41c6acd..cfb0a1906950 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 DEFINE_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);
if (dev_priv->ops->init_pm)
dev_priv->ops->init_pm(dev);
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH -next] gpu: drm: gma500: Use DEFINE_SPINLOCK() for spinlock
@ 2020-12-28 13:51 ` Zheng Yongjun
0 siblings, 0 replies; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-28 13:51 UTC (permalink / raw)
To: patrik.r.jakobsson, airlied, daniel, dri-devel, linux-kernel
Cc: Zheng Yongjun
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/gpu/drm/gma500/power.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/gma500/power.c b/drivers/gpu/drm/gma500/power.c
index b361e41c6acd..cfb0a1906950 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 DEFINE_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);
if (dev_priv->ops->init_pm)
dev_priv->ops->init_pm(dev);
--
2.22.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-29 9:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28 13:51 [PATCH -next] gpu: drm: gma500: Use DEFINE_SPINLOCK() for spinlock Zheng Yongjun
2020-12-28 13:51 ` Zheng Yongjun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.