From patchwork Thu Jan 19 19:10:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13108707 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D137C004D4 for ; Thu, 19 Jan 2023 19:20:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=S/ydqbVYoGu1dC2qotGH8QQawBdORCNycD6Idjm6xok=; b=kOYXdENNgcgVtP1pazCg/82C/s rRbSh/12+yolKxBKIiuVHcUfkJGqCh890dByvKDjPPDU3Xo27WupUEghpNFATmRUB48ERVAKNE3Ik OyNfDuUyXNoO3Slzg+CAZKeVjDfPE2dNOKP7PVCspZ1S5VCEASz8yDnDh7NzXywzK/YkFA9D4qaX0 ifiit4CT5AIylEoFgBglD0KNh5ydLfyFewiHvHjbe66gQwVrzme2adV32zHHjrEkK33yWaGvq2F4l 869VvjwcxhwsJtIjMaunyCn7Orammx0Tvfj58Ti9YRjg2NeQcRZ5LEp1sYJKAjOriunlo3SDxZ30o anbhMBoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIaRz-006szU-SE; Thu, 19 Jan 2023 19:19:52 +0000 Received: from mail-vi1eur05on2077.outbound.protection.outlook.com ([40.107.21.77] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIaJb-006ouu-DU; Thu, 19 Jan 2023 19:11:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J3uHezwUvB+IM3Rfkjq2HdCGN9dclx/IHSDhSpwUTK2qpX+F9HmOrcJ7Hen4wdCVms56kjc44ohNtJZFWTP79+kFuEoXmxP1uFzoMpS5TF2fkkW/pUwotWGpbqurr5jX1prp6CAnhMGdXVDdtNFFV2xTBivvjMXMhS+A4A1pmJGXNE25/VhQqMM1/g4MWvfXd2bsxowcN2dCPILx366KoTsKh/AVemC1moWKCQUmlwwmMzVBeW0wOpNqXLVLyKzqx/jtvHk/X3ak7yCTiyMi0ycuCk+ZKLlVqX1TO4s7pDqCJR9DpGMeqiLStQNdyDl4XDPXgriY0SvNduCOHLksEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=S/ydqbVYoGu1dC2qotGH8QQawBdORCNycD6Idjm6xok=; b=iwOodviHt7S8MVsc10Uq7UB8MleCz2SM9qbYcvDnbIBYmy3FX8D1ssZqEO9Nsud5fPIlrnUh4x+awbZfZYbIp03ruLsjBtlkszNhLqD/2B1dd6peN2K5GFK2iQkDeNHmIU9d2R5Xl45A0h5owMHQPRef9vgD3MU3xnsaP0ztolVceuDBqLGeng7Wfe0kUf4ECMp9B7JSZR9KHfssNA8B0odjQUSmHsDStzH8EhDCwQBMf0aC1hRYG9lmOIuHB6EanYNLH/czGvwOfKvz3Se21h1JDOw4eCQZfAGHwfLMHWWNWrJPTJtTsWMVAhk9ReCG0zQ1166ziVnq7hkrDWzheQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S/ydqbVYoGu1dC2qotGH8QQawBdORCNycD6Idjm6xok=; b=D6CnGq2m5f+OzmVIQDWiBAc/qrxeRqrLVcqYGcna6ywrJ+GVGD3Fkmm3AtY5DySatZMB2oqUAnNxbSSqBlSQZuCTVx4ePeElIHQe74GWRujxJglPrmd852jLfjGL4k+Uup0kAH6TqwvX4h1TFRX1nCNDTdQAIoSzh1MvZfb30Eu9T5wL/zP1cRxODKbz+nKmiY8mI86Yz6UvzmsGpF3ZC9okmG16pViACBxqx4/4gxUL3eZjgDKaZETL9YZzW4YRba1zfzRV5ob4RFPGNMVmIoLWLCzdDs5kC2fwkKtnyfXQbsgc+qE83T3Cv2Sy49ZJaz61sjEEjt/OsVzQXxnR8g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) by DB9PR03MB8259.eurprd03.prod.outlook.com (2603:10a6:10:307::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.19; Thu, 19 Jan 2023 19:10:57 +0000 Received: from DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::6b03:ac16:24b5:9166]) by DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::6b03:ac16:24b5:9166%2]) with mapi id 15.20.5986.023; Thu, 19 Jan 2023 19:10:57 +0000 From: Sean Anderson To: David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, Sean Anderson , Mark Brown , Jaroslav Kysela , Joerg Roedel , Liam Girdwood , Matthias Brugger , Robin Murphy , Takashi Iwai , Will Deacon , Yong Wu , alsa-devel@alsa-project.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v3 2/3] iommu/sound: Use component_match_add_of helper Date: Thu, 19 Jan 2023 14:10:38 -0500 Message-Id: <20230119191040.1637739-3-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20230119191040.1637739-1-sean.anderson@seco.com> References: <20230119191040.1637739-1-sean.anderson@seco.com> X-ClientProxiedBy: BL0PR02CA0047.namprd02.prod.outlook.com (2603:10b6:207:3d::24) To DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR03MB8847:EE_|DB9PR03MB8259:EE_ X-MS-Office365-Filtering-Correlation-Id: f0df6410-229b-42d1-bdb0-08dafa50e51d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jwEJ2HzgHfRobeCKv6OTf6t3Eo6YJ8mm0ivtHPceVdyvpIbN81R5Q5d3JK0tRpEyXepvIGDT03XR5/gTyB4L63nUyakuMjaWYhKOCn7I8RGS5t9rU/Yi0uiCFboQfLO2v+GJK5H9ZKaJSNuWoXelEBmCtYH/g0XR644p2dDxXLSO4seZjjdMI2KwOuYxyUhkYPcN6bfTchChOzEq1+x6EdHL6HKboEwX++FcuL/W0XQyYFu0PCfBtFJ4yStPBu/80TOANJM/j/dW6hacxI+eLHJoNt2SKEhBdiJ5N6Gqg0IcFxJ3DwHKdX3EOcoA8fO7IDkrgaRToqMPZFi/qn3kAzRKfprZjff5oySfiFMuapjwRwdBG2O3btDbYGnWeQu5HVe5n74au0FwaSIj10GJadr7RLLTV8V+OJrIAqv2Z1Zcbq787lPhfsz7A4EjQ3OFH114UAOWH6cOtV53JT4rLv/9oXZSt9bZ5ItMSQW1Ij6GP8wh8zkXswP33+l3GxcDZR7Lpf7xcmMm3SvifTep+z9B9DiMmfRGPKsPQ6GgTblFpBePKUppgRFw3xuSqJ0WiEVCN2l1WNPYUxZdPRkPSjOuWQbSgQadTBWDMfL8tQxWm0ZLYm5dtFs6nxrUcyhnpQOQ6u6LJE2id4O9Zif3NrwpErrbQMeD2qtbG1FZRMqVKoQZzaipCeECuNzFpe8D X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR03MB8847.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(39850400004)(366004)(346002)(136003)(396003)(376002)(451199015)(66556008)(44832011)(5660300002)(8936002)(7416002)(54906003)(41300700001)(2906002)(316002)(66946007)(4326008)(110136005)(8676002)(66476007)(478600001)(38350700002)(6486002)(52116002)(38100700002)(26005)(6512007)(6506007)(36756003)(6666004)(186003)(1076003)(86362001)(2616005)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gNF7W/Osnd2lAyHfU34iesACmNRA7yO1rq/lCh/vhiqJQgjekgWb8OM2BvYANltu6pJuKWlnLagyxOPc5Ak60YO5OrGOY0m9et3kr7fOD86ZbAqoghDsI6sV8b45NFf6IMLwo0D8GoOOErjCe+W+MaVlv4PAttRtCrfaj/QibVLkQSr2G76QI73DmSiDBrq6k0CixYj1HuR3tnqJw43a74VrCt4VI9x74Nx8R1zT6ieIWZPa6cWSK7Lh8xl1iDW5JJ9rRgI4ZDXXnh2UBWv3GmB7hUCYzNDmW3X+zx61jjt0bYTq1EVQa3eR6sHxEw4Z/YZ6x1AsORWN6KeplIGPXym9sr24ajdMg9kTQnRkvw7YiHRG8hcJYXmhtNX1FZCXFpIbqgO/+3/FOeWtJoB5Ufk7SppTniwH94MRrBpSp6g2ajrgta8NGPWwBR1qKhuDPerKsOnUnxO+TeX0CkcV01U0rAE5q1Q6dbH3TAN+K14D38uQicR/DTeDbrsFneV4R3CMbBnLjmv0Ywk2ZGNirFbQ/6Nd6oehfwa6B7TpzwoVkZt8fzZ0GDBOZjBu3FjMKTdVCLM/dhfB8PYec3Ui55fRSEBvmlFdcrvNpp8qKTFZqeHa8fIEu6H5d0hYpYUq1oZk7oR0KjVRBWXhB0J0YfPoiXt6+vG2tovWQQ8a1qdVeOQldsgnV7NTeJ5445bmM1UUKBQd2LXvFpQzF4I7PBd6fhxEt95mrsyeGsz5sdlmGRg1n+QT3m5I19347nlB7IyzMnmpi8CFbOcOpr7M3rrSq3o59NMzFJK2HVR7prJIppx1I4bixPX5vYpsYF62KmDIK1LnqncCicY6WMPNxw3CgOgT3bRtl/KT7Gh4kbCjxo3O0f8gYEqO7klvcPgUtCovD9LHS3z7ol2Huh5XFgRdv1BB9ABUbOYrbEKHdF65GTe06X7qxGBpb0glJwI9nULKOO19pWHcvmtPFIhNCiSX3wxls9Oly79vLmDkHgvQTecPRydpFdD55ihiyd25fNWPMe337pEKohOLlHCGulaa3UGkQs3h29xkbrJ9hOOgJZMrKRP5jcJqe20+iJ9MpFBfDXBxb6oqmJ88YgYqya/eBQwNuoehuiSuqmKJ89QAwdWABd1fNl65upD5hgqG+nNxyesaWnECz7Ap6sEzvM7fJ6j3KfEuWBOps8a5g2haJTvTuuSKBTkSZ9ISltPwhHfguqjYooeaZEjvlnz7a9Nh2A+vHGhKZm9b61yl+EpWTL38pLfYvTC7ZGgnO3us1Fnlhm28FN4qr57HGyaiddMcjsAYQfx6R1KTVifuggBZTeTDoRN2LevukteNcSD8382hzz9WtIAoxmE5H4nLReSDJ+Kl9wfNv2m2zBcNPivMP7CU9LujZxUv86A89Vli4zI3Kf+OeapaAyuLm7tQmW2k28LTaBKKZnhBMvl48gzVRJ+BAWN7F0n0MBbcbaXyqLJwX/Oa7zBbVekkqcLkllnIvX26d1e9lRZrHfJ7e5QV3XFEj1iK8F+bVzb1wUYi71M7otpaMcbPVr/DkLn7BwqptDVDOn1OD9KPIc2GJek/zvP73zdBHHXyKwGJkVX4fWcndJrsYEPi6Y3ldMbeoA== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0df6410-229b-42d1-bdb0-08dafa50e51d X-MS-Exchange-CrossTenant-AuthSource: DB9PR03MB8847.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 19:10:57.5542 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tHs8UYndZ/e5HGDQNjTSU4IiJn2JF1fF07DlkgHnI8Sn2T+UxzUOG4Ec+KhY1jTQ9I2XSj4Oj8Ikuh256sECSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR03MB8259 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_111111_510750_FE132110 X-CRM114-Status: GOOD ( 12.06 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Convert users of component_match_add_release with component_release_of and component_compare_of to component_match_add_of. Signed-off-by: Sean Anderson Acked-by: Mark Brown Reviewed-by: AngeloGioacchino Del Regno --- Changes in v3: - Rebase onto drm/drm-next Changes in v2: - Split off from helper addition drivers/iommu/mtk_iommu_v1.c | 3 +-- sound/soc/codecs/wcd938x.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c index 69682ee068d2..14019ba1e41c 100644 --- a/drivers/iommu/mtk_iommu_v1.c +++ b/drivers/iommu/mtk_iommu_v1.c @@ -670,8 +670,7 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev) } data->larb_imu[i].dev = &plarbdev->dev; - component_match_add_release(dev, &match, component_release_of, - component_compare_of, larbnode); + component_match_add_of(dev, &match, larbnode); } platform_set_drvdata(pdev, data); diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index fcac763b04d1..0663b15fa757 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -4474,8 +4474,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, } of_node_get(wcd938x->rxnode); - component_match_add_release(dev, matchptr, component_release_of, - component_compare_of, wcd938x->rxnode); + component_match_add_of(dev, matchptr, wcd938x->rxnode); wcd938x->txnode = of_parse_phandle(np, "qcom,tx-device", 0); if (!wcd938x->txnode) { @@ -4483,8 +4482,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, return -ENODEV; } of_node_get(wcd938x->txnode); - component_match_add_release(dev, matchptr, component_release_of, - component_compare_of, wcd938x->txnode); + component_match_add_of(dev, matchptr, wcd938x->txnode); return 0; } From patchwork Thu Jan 19 19:10:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13108709 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7DD16C004D4 for ; Thu, 19 Jan 2023 19:22:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Transfer-Encoding:Content-Type:References:In-Reply-To:Message-Id:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ctN7bLC4xagWRYS2vTOilm/APysMKl5QPDsaPZTszWM=; b=06RIyTJG6rqPDT2Z3pMwW+3fto X3BNau05O/mCT6dVegWqtLzwIFYzGJ38kf1wVahqRWfgtzID5tbUfXB/j0yrp8caxmLyULBq7aY3A 8wPArT1Id6w7a5+hx9JrU2SWM9Nh/gI9hRbNUSljeP3yVMdIDAq9EriT5UD/IriPj/SYu+SjPhAF7 FJ2P4n4FvcpLf4FXz7+ruOjoGW3fkO4fbF4nNwMEO3fW57Jk8wT8hYuMgeOSs/VxEN8dmKOmlKFCd 7TxHA+liQAAR/83o1Nj3q79yOl0em+m86NXlGzIAKXiqbb3M7pdSfewnrmftgXaT3xWuHrwHP6cP0 kut67O0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIaTu-006u3a-H5; Thu, 19 Jan 2023 19:21:50 +0000 Received: from mail-vi1eur05on2059.outbound.protection.outlook.com ([40.107.21.59] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIaKN-006pLI-9x; Thu, 19 Jan 2023 19:12:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=grKoOlF19mtEp/o02zhk8yU/KvR9K/u0XYmC367Tx09zVMcVL4YmL5AI8Wx2C7u6bfbIauC9yoDM0bjU3JzQCpdJub5VXit11uSpHxdtB4jMxJfUJBTbnCx9zxBqN1vD4jLaaoDs8MvA5Ex7y8LPBzxK61zsi1v5eu4wx5X49EdFfaqyF1K78WLwRXdnjqm+OPsrXq/OM7Z+xX+OyfDl3uNNnDIWln62ull9PKgGFXijWW9P6LVPf8Yv8Z3qUT7gy2TuVP7uqlxlJujBtwDU02/vZMqWnD0eU/AEP2G9BoeUZs2ZhzuwikX4zvTCmkn+Z3PT4FQfr2SZ3G7nd72x8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ctN7bLC4xagWRYS2vTOilm/APysMKl5QPDsaPZTszWM=; b=A/OZadjzS4g89v81BlEv8ZYuKtkOpx7NDSBNiYz+kUK8I3QbDU5W8oJWjXhaSYjCdwyzKGZJwFuoZc0EEFs/TTGE3RCtvPGe00KYkMmPvutT+ISFKNe9+uWJisOlYgpJtVSIfEDUwUTNB5xIj72nhDVOOOnUYfvkOtRwrr7cHvyQ2KNFKtQ4/lXLACdk2glehwo0htB92fRxcR7pxALoGAYR/4UydusjVU87QX5jEyFp3GoJE0mHqkvl1RyUoR5fd7sz2HSN5DTwjMjkQBDAotJuR/IdwBe36Xw1PtW1a+1HkaQ9HasxcVdaCR/pjcN1WMtTVRYtpFQpbrFMa0w2yw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ctN7bLC4xagWRYS2vTOilm/APysMKl5QPDsaPZTszWM=; b=EEi9Wt2IlUqIRJpfz2XhAcrPTp22WbEXVBGH9d0Mvr2rU/LEAyL2CRTfDqAc7wCaIJbyrnkbK8pnRNlc//5+Ey4ebV7HzaKvzUqvos6b+OH/GcmOCTV0XibcY3OrW2bM8PpxFBHRyGWoMC1CdhWGD3iz7yqWcEW7scKeyGce4d8uXRnYewCUW5vAZkGfYCoE4OLx1NUCoJmJ03q48mcVWkcqHZIx2OB5H2bdwRiSuzbVPQ3QL2JKlxqxXb9bNKXG8eo64DxQfRefIbhI5z2rQJPvsYOxtQgLzdgyzWcjYiV9H5jgdtvH2b+OUMnvkVyTFy4LGJH8KOmd6uzEU+YJsQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) by DB9PR03MB8259.eurprd03.prod.outlook.com (2603:10a6:10:307::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.19; Thu, 19 Jan 2023 19:11:55 +0000 Received: from DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::6b03:ac16:24b5:9166]) by DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::6b03:ac16:24b5:9166%2]) with mapi id 15.20.5986.023; Thu, 19 Jan 2023 19:11:55 +0000 From: Sean Anderson To: David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, Sean Anderson , Jyri Sarha , Abhinav Kumar , Alain Volmat , Brian Starkey , Chen Feng , Chen-Yu Tsai , Christian Gmeiner , Chun-Kuang Hu , Dmitry Baryshkov , Jernej Skrabec , John Stultz , Liviu Dudau , Lucas Stach , Mali DP Maintainers , Matthias Brugger , Mihail Atanassov , Paul Cercueil , Philipp Zabel , Rob Clark , Russell King , Samuel Holland , Sean Paul , Tian Tao , Tomi Valkeinen , Xinliang Liu , Xinwei Kong , etnaviv@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-mips@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH v3 3/3] drm: Convert users of drm_of_component_match_add to component_match_add_of Date: Thu, 19 Jan 2023 14:10:39 -0500 Message-Id: <20230119191040.1637739-4-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20230119191040.1637739-1-sean.anderson@seco.com> References: <20230119191040.1637739-1-sean.anderson@seco.com> X-ClientProxiedBy: BL0PR02CA0047.namprd02.prod.outlook.com (2603:10b6:207:3d::24) To DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR03MB8847:EE_|DB9PR03MB8259:EE_ X-MS-Office365-Filtering-Correlation-Id: 742080c8-7378-49df-6427-08dafa51075f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bHq/qaslLXCVpYGH+DMSkiInrCD2vZlz8oEqitzu5PMuq7EqMz5vDhXHqLjnp7nfoZruP7v5QWD4twrlNfkLwViyIyM52LQ6JigmU0m7ltWyZJsfDNZAJRJGZxUYXW2C9EAga2F2OlPhqjkYjJSLWk8XsRzSMzbF0wKCfQw5IHtKACHsv6A5kDidMmMHNJBfjxAhSfLDJ7xaYi2mjoruMEArCtjYIID5ZVvpgBJPhvBcBfetSg7pGHoE4APyvx+yL9ziUytGgt5+5KX2nED6XEWmTNYCbwULA+sIYaNKXo5trta+DKk6MlCD5OWvIcykV5El41DFBDsjcyR+VmSbdHaVeNoTTZtPtbEfu+bHzqfCIMwwTuegC4wxxi83nwGvV9J7+mCX0pcUiuOOW577YHoLBmdFt2qW1iOj60X+tzfhuDrWCvEqxG+1jNd7PNWJpymk1GjK5FxaaQPcZd6wvy6L8ReQ0ASAPTsTs8ubfPkD+MyPHbBA/MP1fEeJJddHLpV2KSI3chKacF89Sj+vm5W4crNYM7zSgVGFI7ItgvFv5N/zUSMLKBVa3PctzurA8c+1O96jwzxB6ArBoh5Mk7nHN5F6AQLByMasaD56GeK7HVesM9DXWiBTi3Y1RJSj+P2zKQraZHGlRB2VuNidiG0jBT3av2vmVGv4Dja3hx9E2juVbCupW1OFa4Ba2MO2tqVxdnkUvX5MGuDbO96Siw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR03MB8847.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(39850400004)(366004)(346002)(136003)(396003)(376002)(451199015)(66556008)(44832011)(5660300002)(8936002)(7416002)(7406005)(54906003)(41300700001)(2906002)(316002)(66946007)(4326008)(110136005)(8676002)(66476007)(478600001)(38350700002)(6486002)(52116002)(38100700002)(26005)(6512007)(6506007)(36756003)(6666004)(186003)(1076003)(30864003)(86362001)(2616005)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?iSuuWYeWHB/76ONVB7zo2SyvF3IC?= =?utf-8?q?sMbqsKnYNF7PvX07TZFEnhpGD6htSxhhr6+R7oYAeRw/9b0uUlZJceSbGIoiM+Taw?= =?utf-8?q?w3P/hdAegwX9A5Kuaxzu4L4lruPjv3fzt1+3TgiHaPUAyRyroUKgJ8Dj0TA3fX/Ah?= =?utf-8?q?rEq7Rztcb82y6IM/37eIjzRgAa8fD3s25Qevm3jbfjC69+/b+BIi5qh3eWaNw9GS3?= =?utf-8?q?gST5k6iLP1QqE29lnk2QigI9kx6de3SalgLW0drCHLxEpRLQN4ZDBfKg8sBmLo43d?= =?utf-8?q?3jlFeo6ASl4Z7KcpIDajMEUXqlv7IaaNkM2KseNuAsCcD8wY6legxEtpsDZMJzcja?= =?utf-8?q?ROTvyEH+qx/4p6D2dnPf/jgFTx8jqHcM2q7OMn5hEj1AojYh04NOxT7Wlsy7hn0yt?= =?utf-8?q?yk5XD9ufjlwN3rMRx9nx9rydEfkaqjUzXYs08jIbga207F+kGHYK7gOsQO/+fcO0E?= =?utf-8?q?Uae/c3Gz6On5HKxfUnqPan6xyxCFUeJdGdFze2lMP9noHP2wWbNQYUkvldJ4EbJfO?= =?utf-8?q?Y5RnQ4t/hRQmuciXSsXsq/4soXJSLIy7Drivoe7lrQYcMxJw3y2fBAtAI+wR4HCDN?= =?utf-8?q?bMX7plp7InbiRg/imWqwVJY/dQBLZhfigCswyZUVNaE8xbP8VJCIamrj5fI6CjrHu?= =?utf-8?q?VF505hfjFyxlaZrmtXc+QI2XYvUInFWNpFK7YKQbg90PRojcGiKjGTzsyRCCZvYIY?= =?utf-8?q?MkVdFOltmQrpg3Si1Cdw05xQvD2pKP4cC9g+C77k9/bVUNaclPh/USWyBNSZzaljE?= =?utf-8?q?aHFrAyMW1YpAef21TtehzWC7zD2P+f1ts/afCmpIpxxhCYJOpC8TmEKGmiNZtDJJ0?= =?utf-8?q?SUUypoGZ4OWFSxMMz8xxDOE6X6oGjoIRlPg09ZTVIRlnEakqBTuEPLXtUW/6iAufz?= =?utf-8?q?kp6EuC9HO2iX7W8rd1tr4qX3LJ/QVL68PxG2kipD8yJcFd3Pv+wYZzdMT4nebs2uh?= =?utf-8?q?FtnNWV56tAbyEWYFUsY5Gv26n+qcKZJNXqpi+JFivZp3DKaNEbWd65lZqDDB5rOYv?= =?utf-8?q?X9cUDaFop7nCEYAf1iO+0x2VlidE5q8aUEZIyYPAKPswm7kUME0HiGIGzODKsyJ72?= =?utf-8?q?jCBMKk5rGQ/FEvqa1XYPSb8Q3H60MB+26A+D7EBKP8eVl6/FxEcz7HHuZa6CHVWM2?= =?utf-8?q?Sa110JVYzzYLzoizlo6yoqK1XUpxPYiQSeHqgiP0EZwRTxi6xMSFeB8q5KJljEXan?= =?utf-8?q?2DmDoR+NVaES3vZd87ysZi6TmpsdEfBUiPOCCJo6hdIpGVnjpBt6XtyegXhhW288a?= =?utf-8?q?78cChX8HapOlCZON9MAx5kHFKTGgh0mzQ51ylaHIhxn2zEEYpUVLeDOy/zanYRGgb?= =?utf-8?q?nc94IvyzThRVzK0jzwxFRBW3rbcXzyi9Yn+EGjpBcFr7rijVKUmHaRnTk9CThxKzb?= =?utf-8?q?gSD+lMC3wVCskQnaoK8qt4ASKXzCJM3tHPwyGfnOvBD6ODAJHWlXkWA879R+sO7A2?= =?utf-8?q?F2oZ7J8SvvgnbVkK2FfvUfgujeJbRTvICuRaUYRRm6WV/aYKZ3CQUyw2HcSV+WQmD?= =?utf-8?q?bWkvPaTcguxV2kZ3XT0Ufc9IL1nLwWL8yw=3D=3D?= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 742080c8-7378-49df-6427-08dafa51075f X-MS-Exchange-CrossTenant-AuthSource: DB9PR03MB8847.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 19:11:55.1052 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pnxFucNJVPo6L6GS2uJ5MNC/VS7k6GymeTBKIjuFnQYgoidiTJGWH0gktg6E/+gnFO1qS6QTwlzGKcRBiPWk9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR03MB8259 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_111159_657199_6E0BEEC2 X-CRM114-Status: GOOD ( 17.08 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Every user of this function either uses component_compare_of or something equivalent. Most of them immediately put the device node as well. Convert these users to component_match_add_of and remove drm_of_component_match_add. Signed-off-by: Sean Anderson Acked-by: Jyri Sarha Tested-by: Jyri Sarha Tested-by: AngeloGioacchino Del Regno --- (no changes since v1) .../gpu/drm/arm/display/komeda/komeda_drv.c | 6 ++-- drivers/gpu/drm/arm/hdlcd_drv.c | 9 +----- drivers/gpu/drm/arm/malidp_drv.c | 11 +------ drivers/gpu/drm/armada/armada_drv.c | 10 ++++--- drivers/gpu/drm/drm_of.c | 29 +++---------------- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +-- .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 +- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 3 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 +-- drivers/gpu/drm/msm/msm_drv.c | 14 ++++----- drivers/gpu/drm/sti/sti_drv.c | 3 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 3 +- drivers/gpu/drm/tilcdc/tilcdc_external.c | 10 ++----- include/drm/drm_of.h | 12 -------- 14 files changed, 33 insertions(+), 88 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c index 3f4e719eebd8..e3bfc72c378f 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c @@ -103,10 +103,8 @@ static void komeda_add_slave(struct device *master, struct device_node *remote; remote = of_graph_get_remote_node(np, port, endpoint); - if (remote) { - drm_of_component_match_add(master, match, component_compare_of, remote); - of_node_put(remote); - } + if (remote) + component_match_add_of(master, match, remote); } static int komeda_platform_probe(struct platform_device *pdev) diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index e3507dd6f82a..5f760bb66af4 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -347,11 +347,6 @@ static const struct component_master_ops hdlcd_master_ops = { .unbind = hdlcd_drm_unbind, }; -static int compare_dev(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static int hdlcd_probe(struct platform_device *pdev) { struct device_node *port; @@ -362,9 +357,7 @@ static int hdlcd_probe(struct platform_device *pdev) if (!port) return -ENODEV; - drm_of_component_match_add(&pdev->dev, &match, compare_dev, port); - of_node_put(port); - + component_match_add_of(&pdev->dev, &match, port); return component_master_add_with_match(&pdev->dev, &hdlcd_master_ops, match); } diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 589c1c66a6dc..3a49c29ba5b8 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -909,13 +909,6 @@ static const struct component_master_ops malidp_master_ops = { .unbind = malidp_unbind, }; -static int malidp_compare_dev(struct device *dev, void *data) -{ - struct device_node *np = data; - - return dev->of_node == np; -} - static int malidp_platform_probe(struct platform_device *pdev) { struct device_node *port; @@ -929,9 +922,7 @@ static int malidp_platform_probe(struct platform_device *pdev) if (!port) return -ENODEV; - drm_of_component_match_add(&pdev->dev, &match, malidp_compare_dev, - port); - of_node_put(port); + component_match_add_of(&pdev->dev, &match, port); return component_master_add_with_match(&pdev->dev, &malidp_master_ops, match); } diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c index 0643887800b4..c0211ad7a45d 100644 --- a/drivers/gpu/drm/armada/armada_drv.c +++ b/drivers/gpu/drm/armada/armada_drv.c @@ -184,10 +184,12 @@ static void armada_add_endpoints(struct device *dev, for_each_endpoint_of_node(dev_node, ep) { remote = of_graph_get_remote_port_parent(ep); - if (remote && of_device_is_available(remote)) - drm_of_component_match_add(dev, match, component_compare_of, - remote); - of_node_put(remote); + if (remote) { + if (of_device_is_available(remote)) + component_match_add_of(dev, match, remote); + else + of_node_put(remote); + } } } diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 7bbcb999bb75..0a474729ddf6 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -78,24 +78,6 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, } EXPORT_SYMBOL(drm_of_find_possible_crtcs); -/** - * drm_of_component_match_add - Add a component helper OF node match rule - * @master: master device - * @matchptr: component match pointer - * @compare: compare function used for matching component - * @node: of_node - */ -void drm_of_component_match_add(struct device *master, - struct component_match **matchptr, - int (*compare)(struct device *, void *), - struct device_node *node) -{ - of_node_get(node); - component_match_add_release(master, matchptr, component_release_of, - compare, node); -} -EXPORT_SYMBOL_GPL(drm_of_component_match_add); - /** * drm_of_component_probe - Generic probe function for a component based master * @dev: master device containing the OF node @@ -130,10 +112,9 @@ int drm_of_component_probe(struct device *dev, break; if (of_device_is_available(port->parent)) - drm_of_component_match_add(dev, &match, compare_of, - port); - - of_node_put(port); + component_match_add_of(dev, &match, port); + else + of_node_put(port); } if (i == 0) { @@ -171,9 +152,7 @@ int drm_of_component_probe(struct device *dev, continue; } - drm_of_component_match_add(dev, &match, compare_of, - remote); - of_node_put(remote); + component_match_add_of(dev, &match, remote); } of_node_put(port); } diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c index 1d2b4fb4bcf8..4a0dba34a6e7 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c @@ -590,8 +590,8 @@ static int etnaviv_pdev_probe(struct platform_device *pdev) if (!first_node) first_node = core_node; - drm_of_component_match_add(&pdev->dev, &match, - component_compare_of, core_node); + of_node_get(core_node); + component_match_add_of(&pdev->dev, &match, core_node); } } else { char **names = dev->platform_data; diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c index 9c5d49bf40c9..3ee277615c39 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c @@ -273,8 +273,7 @@ static int kirin_drm_platform_probe(struct platform_device *pdev) if (!remote) return -ENODEV; - drm_of_component_match_add(dev, &match, component_compare_of, remote); - of_node_put(remote); + component_match_add_of(dev, &match, remote); return component_master_add_with_match(dev, &kirin_drm_ops, match); } diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c index 3d5af44bf92d..d0c87175dec4 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -1444,8 +1444,7 @@ static int ingenic_drm_probe(struct platform_device *pdev) if (!np) return ingenic_drm_bind(dev, false); - drm_of_component_match_add(dev, &match, component_compare_of, np); - of_node_put(np); + component_match_add_of(dev, &match, np); return component_master_add_with_match(dev, &ingenic_master_ops, match); } diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index cd5b18ef7951..abead814bfdc 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -787,8 +787,8 @@ static int mtk_drm_probe(struct platform_device *pdev) comp_type == MTK_DSI) { dev_info(dev, "Adding component match for %pOF\n", node); - drm_of_component_match_add(dev, &match, component_compare_of, - node); + of_node_get(node); + component_match_add_of(dev, &match, node); } ret = mtk_ddp_comp_init(node, &private->ddp_comp[comp_id], comp_id); diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 8b0b0ac74a6f..8ccf57def955 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -5,6 +5,7 @@ * Author: Rob Clark */ +#include #include #include #include @@ -1156,10 +1157,9 @@ static int add_components_mdp(struct device *master_dev, continue; if (of_device_is_available(intf)) - drm_of_component_match_add(master_dev, matchptr, - component_compare_of, intf); - - of_node_put(intf); + component_match_add_of(master_dev, matchptr, intf); + else + of_node_put(intf); } return 0; @@ -1188,9 +1188,9 @@ static int add_gpu_components(struct device *dev, return 0; if (of_device_is_available(np)) - drm_of_component_match_add(dev, matchptr, component_compare_of, np); - - of_node_put(np); + component_match_add_of(dev, matchptr, np); + else + of_node_put(np); return 0; } diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index ef6a4e63198f..e3aae4574c75 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -238,8 +238,7 @@ static int sti_platform_probe(struct platform_device *pdev) child_np = of_get_next_available_child(node, NULL); while (child_np) { - drm_of_component_match_add(dev, &match, component_compare_of, - child_np); + component_match_add_of(dev, &match, child_np); child_np = of_get_next_available_child(node, child_np); } diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index cc94efbbf2d4..9b3ddd82f1be 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -323,7 +323,8 @@ static int sun4i_drv_add_endpoints(struct device *dev, of_device_is_available(node))) { /* Add current component */ DRM_DEBUG_DRIVER("Adding component %pOF\n", node); - drm_of_component_match_add(dev, match, component_compare_of, node); + of_node_get(node); + component_match_add_of(dev, match, node); count++; } diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm/tilcdc/tilcdc_external.c index 3b86d002ef62..0138ce02a64f 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_external.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_external.c @@ -155,11 +155,6 @@ int tilcdc_attach_external_device(struct drm_device *ddev) return ret; } -static int dev_match_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - int tilcdc_get_external_components(struct device *dev, struct component_match **match) { @@ -173,7 +168,8 @@ int tilcdc_get_external_components(struct device *dev, } if (match) - drm_of_component_match_add(dev, match, dev_match_of, node); - of_node_put(node); + component_match_add_of(dev, match, node); + else + of_node_put(node); return 1; } diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index 10ab58c40746..685c44dc1dae 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -33,10 +33,6 @@ uint32_t drm_of_crtc_port_mask(struct drm_device *dev, struct device_node *port); uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, struct device_node *port); -void drm_of_component_match_add(struct device *master, - struct component_match **matchptr, - int (*compare)(struct device *, void *), - struct device_node *node); int drm_of_component_probe(struct device *dev, int (*compare_of)(struct device *, void *), const struct component_master_ops *m_ops); @@ -69,14 +65,6 @@ static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, return 0; } -static inline void -drm_of_component_match_add(struct device *master, - struct component_match **matchptr, - int (*compare)(struct device *, void *), - struct device_node *node) -{ -} - static inline int drm_of_component_probe(struct device *dev, int (*compare_of)(struct device *, void *),