From patchwork Fri Mar 28 11:52:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 3902591 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E25979F2E8 for ; Fri, 28 Mar 2014 11:53:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D53A202EC for ; Fri, 28 Mar 2014 11:53:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3B20820263 for ; Fri, 28 Mar 2014 11:53:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752088AbaC1Lx3 (ORCPT ); Fri, 28 Mar 2014 07:53:29 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:56950 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752053AbaC1Lx2 (ORCPT ); Fri, 28 Mar 2014 07:53:28 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N35004JFACUR3A0@mailout2.w1.samsung.com>; Fri, 28 Mar 2014 11:53:19 +0000 (GMT) X-AuditID: cbfec7f5-b7fc96d000004885-10-533562b5a398 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id E9.A8.18565.5B265335; Fri, 28 Mar 2014 11:53:25 +0000 (GMT) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N3500JZBACMH5A0@eusync4.samsung.com>; Fri, 28 Mar 2014 11:53:25 +0000 (GMT) From: Andrzej Hajda To: dri-devel@lists.freedesktop.org Cc: Andrzej Hajda , Mark Rutland , devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Pawel Moll , Ian Campbell , Kyungmin Park , Rob Herring , Kumar Gala , Grant Likely , Sean Paul , Inki Dae , Marek Szyprowski Subject: [PATCH v3 02/12] drm/mipi_dsi: create dsi devices only for nodes with reg property Date: Fri, 28 Mar 2014 12:52:37 +0100 Message-id: <1396007567-4015-3-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.8.3.2 In-reply-to: <1396007567-4015-1-git-send-email-a.hajda@samsung.com> References: <1396007567-4015-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHLMWRmVeSWpSXmKPExsVy+t/xa7pbk0yDDZ79tra4te4cq8X8I0Di ytf3bBb9bxayWhz4s4PR4tyrlYwWk+5PYLE42/SG3WLG+X1MFmuP3GW3WHr9IpPFhOlrWSxa 9x5ht7i74SyjA5/HmnlrGD1mN1xk8bjc18vksXL5FzaPTas62TzuXNvD5nG/+ziTR9+WVYwe nzfJBXBGcdmkpOZklqUW6dslcGV8XHeQqWACe8XM3g8sDYx/WLsYOTkkBEwkns4+wAxhi0lc uLeerYuRi0NIYCmjxMaWN0wQTh+TxOsth8E62AQ0Jf5uvskGYosIKEv8nbiKEaSIWeA9s8Te K5MZQRLCArESV5e2gjWwCKhKnHp7AizOK+Akcf7fSqh1ChLLvqwFszkFnCVWvZ0INlQIqObO 80bmCYy8CxgZVjGKppYmFxQnpeca6RUn5haX5qXrJefnbmKEhPHXHYxLj1kdYhTgYFTi4Z1h ZRIsxJpYVlyZe4hRgoNZSYR3ia1psBBvSmJlVWpRfnxRaU5q8SFGJg5OqQZGfh/z19HysbHF emqtEWlxl7aH/Fm2OD8v7cEZE5ebgSZl9XcnvPIulN01o2Snw+RbdsccDdZZyDWmrT+h4Obc 3i3DWHqB97DPjuMqMRkv8jm91Oebq+WmSxlf26+WWT6H7x+L9FVTtoDPSz5rm84Mtp6hF7eu RunjRtUVUzv9o6e4uLrmPFNiKc5INNRiLipOBACQD5oHQQIAAA== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 MIPI DSI host node can contain child nodes which are not DSI devices. Checking for existence of reg property can be used to distinguish such nodes. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/drm_mipi_dsi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index b155ee2..09821f4 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -142,8 +142,12 @@ int mipi_dsi_host_register(struct mipi_dsi_host *host) { struct device_node *node; - for_each_available_child_of_node(host->dev->of_node, node) + for_each_available_child_of_node(host->dev->of_node, node) { + /* skip nodes without reg property */ + if (!of_find_property(node, "reg", NULL)) + continue; of_mipi_dsi_device_add(host, node); + } return 0; }