From patchwork Tue Dec 18 15:37:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10736861 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 958846C2 for ; Wed, 19 Dec 2018 08:41:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FCA82AE6F for ; Wed, 19 Dec 2018 08:41:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 734602AEC7; Wed, 19 Dec 2018 08:41:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F2CC12AEAB for ; Wed, 19 Dec 2018 08:41:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 12B826EE24; Wed, 19 Dec 2018 08:40:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from shell.v3.sk (shell.v3.sk [90.176.6.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id 16CA36EC40 for ; Tue, 18 Dec 2018 15:38:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id A7E34CA1DB; Tue, 18 Dec 2018 16:38:17 +0100 (CET) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id pB60S8WlRBRY; Tue, 18 Dec 2018 16:38:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 23BBDCA22C; Tue, 18 Dec 2018 16:37:51 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id j-AFtKD0xEwv; Tue, 18 Dec 2018 16:37:48 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 2CD5CCA2DA; Tue, 18 Dec 2018 16:37:47 +0100 (CET) From: Lubomir Rintel To: dri-devel@lists.freedesktop.org Subject: [RFC 10/16] drm/armada: fix compare_of() for LCD controllers Date: Tue, 18 Dec 2018 16:37:36 +0100 Message-Id: <20181218153742.1313125-11-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181218153742.1313125-1-lkundrak@v3.sk> References: <20181218153742.1313125-1-lkundrak@v3.sk> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 19 Dec 2018 08:40:40 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King , James Cameron Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Russell King The DT node passed for LCD controllers is the "port" node within the parent device. Detect this and compare the parent node. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c index fa31589b4fc0..9f2eb02df295 100644 --- a/drivers/gpu/drm/armada/armada_drv.c +++ b/drivers/gpu/drm/armada/armada_drv.c @@ -181,7 +181,10 @@ static void armada_drm_unbind(struct device *dev) static int compare_of(struct device *dev, void *data) { - return dev->of_node == data; + struct device_node *np = data; + if (of_node_cmp(np->name, "port") == 0) + np = np->parent; + return dev->of_node == np; } static int compare_dev_name(struct device *dev, void *data)