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: 6477701 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B90F0C0020 for ; Tue, 26 May 2015 03:56:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0088C20439 for ; Tue, 26 May 2015 03:56:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1123420430 for ; Tue, 26 May 2015 03:56:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 179AC6E5C0; Mon, 25 May 2015 20:56:38 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by gabe.freedesktop.org (Postfix) with ESMTP id 78FB66E4A6 for ; Mon, 25 May 2015 07:58:24 -0700 (PDT) Received: by wifw1 with SMTP id w1so326407wif.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-Mailman-Approved-At: Mon, 25 May 2015 20:56:36 -0700 Cc: Mark Rutland , Alexandre Courbot , =?UTF-8?q?Terje=20Bergstr=C3=B6m?= , Tomeu Vizoso , Stephen Warren , Dmitry Torokhov , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , dri-devel@lists.freedesktop.org, Grant Likely , Alexander Holler X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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=unavailable 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)