summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/rockchip/cdn-dp-core.c
diff options
context:
space:
mode:
authorJeffy Chen <jeffy.chen@rock-chips.com>2017-02-05 15:55:00 +0800
committerMark Yao <mark.yao@rock-chips.com>2017-02-05 16:29:58 +0800
commitbe0270e4d14656d36e76c098ebe822ca2fc34044 (patch)
tree9f3464a51682b9176784df29440cbb828e9869b3 /drivers/gpu/drm/rockchip/cdn-dp-core.c
parent81632df69772efaacc6218281f58d5ed19d5c97e (diff)
drm/rockchip: cdn-dp: Move mutex_init to probe
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>
Diffstat (limited to 'drivers/gpu/drm/rockchip/cdn-dp-core.c')
-rw-r--r--drivers/gpu/drm/rockchip/cdn-dp-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index 62e02a48ebea..799e8260e7c4 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);