From patchwork Mon Feb 14 06:08:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?WW9uZyBXdSAo5ZC05YuHKQ==?= X-Patchwork-Id: 12744920 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB304C433F5 for ; Mon, 14 Feb 2022 06:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240628AbiBNGKh (ORCPT ); Mon, 14 Feb 2022 01:10:37 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:50096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240684AbiBNGKe (ORCPT ); Mon, 14 Feb 2022 01:10:34 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6938757B29; Sun, 13 Feb 2022 22:10:26 -0800 (PST) X-UUID: 862b7b1f808d4b5a84f85ecfb3e4bcde-20220214 X-UUID: 862b7b1f808d4b5a84f85ecfb3e4bcde-20220214 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 853127056; Mon, 14 Feb 2022 14:10:22 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Mon, 14 Feb 2022 14:10:21 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:10:19 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , Sean Paul , Abhinav Kumar , , Subject: [PATCH 09/23] drm/msm: Make use of the helper component_compare_of Date: Mon, 14 Feb 2022 14:08:05 +0800 Message-ID: <20220214060819.7334-10-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Use the common compare helper from component. Cc: Rob Clark Cc: Sean Paul Cc: Abhinav Kumar Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Yong Wu --- drivers/gpu/drm/msm/msm_drv.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index ad35a5d94053..50e5a6ff6487 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -1173,15 +1173,6 @@ static const struct dev_pm_ops msm_pm_ops = { * Componentized driver support: */ -/* - * NOTE: duplication of the same code as exynos or imx (or probably any other). - * so probably some room for some helpers - */ -static int compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - /* * Identify what components need to be added by parsing what remote-endpoints * our MDP output ports are connected to. In the case of LVDS on MDP4, there @@ -1239,7 +1230,7 @@ static int add_components_mdp(struct device *mdp_dev, if (of_device_is_available(intf)) drm_of_component_match_add(master_dev, matchptr, - compare_of, intf); + component_compare_of, intf); of_node_put(intf); } @@ -1285,7 +1276,7 @@ static int add_display_components(struct platform_device *pdev, put_device(mdp_dev); /* add the MDP component itself */ - drm_of_component_match_add(dev, matchptr, compare_of, + drm_of_component_match_add(dev, matchptr, component_compare_of, mdp_dev->of_node); break; case KMS_MDP4: @@ -1324,7 +1315,7 @@ static int add_gpu_components(struct device *dev, return 0; if (of_device_is_available(np)) - drm_of_component_match_add(dev, matchptr, compare_of, np); + drm_of_component_match_add(dev, matchptr, component_compare_of, np); of_node_put(np);