Commit be0270e4 authored by Jeffy Chen's avatar Jeffy Chen Committed by Mark Yao
Browse files

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: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
Reviewed-by: default avatarChris Zhong <zyw@rock-chips.com>
Signed-off-by: default avatarChris Zhong <zyw@rock-chips.com>
parent 81632df6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);