From patchwork Mon May 25 14:53:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 6475501 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9BB969F1CC for ; Mon, 25 May 2015 15:11:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D8279203B6 for ; Mon, 25 May 2015 15:11:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0BAE820381 for ; Mon, 25 May 2015 15:11:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ywtzl-0004az-K0; Mon, 25 May 2015 15:08:49 +0000 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ywtq1-0004bt-LO for linux-arm-kernel@lists.infradead.org; Mon, 25 May 2015 14:58:50 +0000 Received: by wicmx19 with SMTP id mx19so42535614wic.0 for ; Mon, 25 May 2015 07:58:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=pCu4IDuEvGL1aH3cEjxHvZC0YId7RN/ygo+d3wdY41U=; b=AjS4juqdz1XqxybqIoqGdQwGiBPfb0WL5VDhUVXg6D3tk+SI8NxSTB9Qo0CIb3hj1w 6OFs94ermi0vuc2+GZ1JrBIfxORDMFR/xWURCJbzOknGXMzwIsRy2de93fh2ZlsY2Cm3 lSaJ3YKo/ueDCdjPOcrY0Z8xqaOk+8a8Gcx5cFx5gJuRFCCH6JBhjmQOzAWyx5V6FWfZ JResWVKyvmID4o7lNIWuBrs67dM9RJq68OtWBej7yMsL4/glwMACLRHRaDm53fg2UKBv 4/gr4C5NmSzygbavmcX/lBa3PmCFsFx2AxftuWalRLmgThewP47YVxlpiNlbSgAiGRyi LHkg== X-Received: by 10.194.123.4 with SMTP id lw4mr972820wjb.94.1432565903748; Mon, 25 May 2015 07:58:23 -0700 (PDT) Received: from cizrna.lan ([109.72.12.80]) by mx.google.com with ESMTPSA id ez19sm12258917wid.19.2015.05.25.07.58.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 May 2015 07:58:22 -0700 (PDT) From: Tomeu Vizoso To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 12/21] drm/tegra: Probe dpaux devices on demand Date: Mon, 25 May 2015 16:53:16 +0200 Message-Id: <1432565608-26036-13-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.4.1 In-Reply-To: <1432565608-26036-1-git-send-email-tomeu.vizoso@collabora.com> References: <1432565608-26036-1-git-send-email-tomeu.vizoso@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150525_075845_891725_D34B7B66 X-CRM114-Status: UNSURE ( 8.98 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Mark Rutland , Alexandre Courbot , =?UTF-8?q?Terje=20Bergstr=C3=B6m?= , Tomeu Vizoso , Stephen Warren , David Airlie , Dmitry Torokhov , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , =?UTF-8?q?St=C3=A9phane=20Marchesin?= , Thierry Reding , dri-devel@lists.freedesktop.org, Grant Likely , Alexander Holler X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When looking up a dpaux device through its DT node, ensure that the corresponding device has been registered. Signed-off-by: Tomeu Vizoso --- drivers/gpu/drm/tegra/dpaux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c index d6b55e3..10bba41 100644 --- a/drivers/gpu/drm/tegra/dpaux.c +++ b/drivers/gpu/drm/tegra/dpaux.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -397,6 +398,8 @@ struct tegra_dpaux *tegra_dpaux_find_by_of_node(struct device_node *np) { struct tegra_dpaux *dpaux; + of_platform_device_ensure(np); + mutex_lock(&dpaux_lock); list_for_each_entry(dpaux, &dpaux_list, list)