From patchwork Mon May 25 14:53:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 6477711 Return-Path: X-Original-To: patchwork-dri-devel@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 E8C0B9F38C for ; Tue, 26 May 2015 03:56:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23A2820445 for ; Tue, 26 May 2015 03:56:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 18EA1204D3 for ; Tue, 26 May 2015 03:56:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 07A056E5BE; Mon, 25 May 2015 20:56:37 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by gabe.freedesktop.org (Postfix) with ESMTP id A00586E4A6 for ; Mon, 25 May 2015 07:58:22 -0700 (PDT) Received: by wicmx19 with SMTP id mx19so42535017wic.0 for ; Mon, 25 May 2015 07:58:21 -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=7hOpIO7ncWjcvwvOaQXFQaGk3pt0wFYkplTQQFrs1gc=; b=l6zejFyVuqGLIvWWFcWDUcowQRg9L00yQsrpVgw3Ea3AGzdbK/Bxw3mLDBiEo9Urvy HDAJg49PPJV2m7sjbEZQlxFyZs+/rNYcKTPt+r1PRryNQdJh9b//GPwXrt1ThKCEPqv0 jESNRtqYm3qUA7H0cTzytepfmT9WpS1xVslhH2jQKD60ig69SDZU7OFGCmOA0YBhktUu +u7PuH2+sfch0Y+PlKQFspxyiFnkdocg+4/VrJL5bt5IR6ReLS+XbxdAEZ3wUtr5SfnQ Xtsdr92sgeDDlaOU6F7uDWjoN07r+XxoJsVCFphl5xxPrauCL+D626pSTGwk239JXrGn YpAA== X-Received: by 10.194.109.167 with SMTP id ht7mr39846311wjb.60.1432565901753; Mon, 25 May 2015 07:58:21 -0700 (PDT) Received: from cizrna.lan ([109.72.12.80]) by mx.google.com with ESMTPSA id ez19sm12258917wid.19.2015.05.25.07.58.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 May 2015 07:58:20 -0700 (PDT) From: Tomeu Vizoso To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 11/21] drm: Probe panels on demand Date: Mon, 25 May 2015 16:53:15 +0200 Message-Id: <1432565608-26036-12-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 , Tomeu Vizoso , Dmitry Torokhov , 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 panel through its DT node, ensure that the corresponding device has been registered. Signed-off-by: Tomeu Vizoso --- drivers/gpu/drm/drm_panel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c index 2ef988e..041211e 100644 --- a/drivers/gpu/drm/drm_panel.c +++ b/drivers/gpu/drm/drm_panel.c @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -80,6 +81,8 @@ struct drm_panel *of_drm_find_panel(struct device_node *np) { struct drm_panel *panel; + of_platform_device_ensure(np); + mutex_lock(&panel_lock); list_for_each_entry(panel, &panel_list, list) {