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: 6475521 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 F196F9F1CC for ; Mon, 25 May 2015 15:12:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D47120381 for ; Mon, 25 May 2015 15:12:32 +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 262AC2012E for ; Mon, 25 May 2015 15:12:31 +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 1Ywu0T-0005KL-H7; Mon, 25 May 2015 15:09:33 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ywtq7-0004iM-Qm for linux-arm-kernel@bombadil.infradead.org; Mon, 25 May 2015 14:58:52 +0000 Received: from mail-wg0-x22b.google.com ([2a00:1450:400c:c00::22b]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ywtq1-0007OW-Bd for linux-arm-kernel@lists.infradead.org; Mon, 25 May 2015 14:58:49 +0000 Received: by wgez8 with SMTP id z8so75034889wge.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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150525_155845_429843_9AC29C5B X-CRM114-Status: GOOD ( 10.32 ) X-Spam-Score: -2.6 (--) Cc: Mark Rutland , Tomeu Vizoso , David Airlie , Dmitry Torokhov , 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 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) {