public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: zyw@rock-chips.com (Chris Zhong)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v17 5/7] drm/rockchip: cdn-dp: Move mutex_init to probe
Date: Sun,  5 Feb 2017 15:55:00 +0800	[thread overview]
Message-ID: <1486281302-28200-6-git-send-email-zyw@rock-chips.com> (raw)
In-Reply-To: <1486281302-28200-1-git-send-email-zyw@rock-chips.com>

From: Jeffy Chen <jeffy.chen@rock-chips.com>

We're trying to lock mutex when cdn-dp shutdown, so we need to make
sure the mutex is inited in cdn-dp's probe.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
---

Changes in v17: None

 drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index 62e02a4..799e826 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
@@ -1041,7 +1041,6 @@ static int cdn_dp_bind(struct device *dev, struct device *master, void *data)
 	dp->connected = false;
 	dp->active = false;
 
-	mutex_init(&dp->lock);
 	INIT_WORK(&dp->event_work, cdn_dp_pd_event_work);
 
 	encoder = &dp->encoder;
@@ -1204,6 +1203,7 @@ static int cdn_dp_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
+	mutex_init(&dp->lock);
 	dev_set_drvdata(dev, dp);
 
 	return component_add(dev, &cdn_dp_component_ops);
-- 
2.6.3

  parent reply	other threads:[~2017-02-05  7:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-05  7:54 [PATCH v17 0/7] drm/rockchip: Add CDN DP driver Chris Zhong
2017-02-05  7:54 ` [PATCH v17 1/7] drm/rockchip: cdn-dp: add cdn DP support for rk3399 Chris Zhong
2017-02-05  7:54 ` [PATCH v17 2/7] drm/rockchip: cdn-dp: Load firmware if no monitor connected Chris Zhong
2017-02-05  7:54 ` [PATCH v17 3/7] drm/rockchip: cdn-dp: Do not run worker while suspended Chris Zhong
2017-02-05  7:54 ` [PATCH v17 4/7] drm/rockchip: cdn-dp: do not use drm_helper_hpd_irq_event Chris Zhong
2017-02-05  7:55 ` Chris Zhong [this message]
2017-02-05  7:55 ` [PATCH v17 6/7] drm/rockchip: cdn-dp: retry to check sink count Chris Zhong
2017-02-05  7:55 ` [PATCH v17 7/7] drm/rockchip: cdn-dp: don't configure hardware in mode_set Chris Zhong
2017-02-05  8:42 ` [PATCH v17 0/7] drm/rockchip: Add CDN DP driver Mark yao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1486281302-28200-6-git-send-email-zyw@rock-chips.com \
    --to=zyw@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox