From patchwork Sun Feb 5 07:55:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zhong X-Patchwork-Id: 9555997 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1CB3A602B5 for ; Sun, 5 Feb 2017 08:08:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A57A25F31 for ; Sun, 5 Feb 2017 08:08:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE85C275A2; Sun, 5 Feb 2017 08:08:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=2.0 tests=BAYES_00, RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A4C772022B for ; Sun, 5 Feb 2017 08:08:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1caHs8-0000lt-0M; Sun, 05 Feb 2017 08:08:32 +0000 Received: from mail-pf0-f193.google.com ([209.85.192.193]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1caHgs-0003vF-Cg; Sun, 05 Feb 2017 07:56:58 +0000 Received: by mail-pf0-f193.google.com with SMTP id e4so4642535pfg.0; Sat, 04 Feb 2017 23:56:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=00q5nHthBvjnrLuzQaHd4Fr44dyiJq8zvrbOuaiX9OY=; b=XjMsGaAxruUKYkZ8f8NUJ4dzO+oyU3cVlTl0fMMGQDQBPn3I6AqwaHjmw2rRapxZ2Y dFi5T/8lA0gjju0+1JjdA0k+1lYiBKGswkfzjJaILerB0ppnan4hqYRd1nISEVYn6Lxj O7qJ3HgMUDAK37WMEH4kiN/wxfiZgL5bc8q3ALdvz10wp58DMNui2+Q1qiFVcdt53U8G Xth+xXlnkIpuzmaj/naTBTtuudzO4ZER2T60EctqiLmc+7SXBBlBAD7mlLSp1MbsFF5t sLRXiivGm6d/+x6jpAj19Z/02qyK0BVuhKXNhFV1rMfEObZJwUuk9ov8rUxmydU9+epX 7FMQ== X-Gm-Message-State: AIkVDXLv00VoCzSSJxS+atiXJGRELSlBdyJy+DaGWst2tVBniVQFs8QoQftLpnKycJOz8g== X-Received: by 10.84.231.134 with SMTP id g6mr8717405plk.40.1486281393632; Sat, 04 Feb 2017 23:56:33 -0800 (PST) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id o18sm80321582pgn.36.2017.02.04.23.56.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 04 Feb 2017 23:56:33 -0800 (PST) From: Chris Zhong To: dri-devel@lists.freedesktop.org, linux-rockchip@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 Message-Id: <1486281302-28200-6-git-send-email-zyw@rock-chips.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1486281302-28200-1-git-send-email-zyw@rock-chips.com> References: <1486281302-28200-1-git-send-email-zyw@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170204_235654_799206_1039E7E0 X-CRM114-Status: UNSURE ( 8.08 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , David Airlie , Jeffy Chen , linux-kernel@vger.kernel.org, zyw@rock-chips.com, seanpaul@chromium.org, groeck@chromium.org, linux-arm-kernel@lists.infradead.org, mark.yao@rock-chips.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jeffy Chen 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 Reviewed-by: Guenter Roeck Reviewed-by: Chris Zhong Signed-off-by: Chris Zhong --- 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);