From patchwork Thu Dec 22 23:37:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13080437 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 A568CC3DA7A for ; Thu, 22 Dec 2022 23:38:52 +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=kEBfPTZlgkreP+XuG4W5PTE+mzXKo0XwInNaxx9l5Ug=; b=Cck1Ol6nkykJOsXGMfIJdtewoW wT/of+dQwWupM2+swQu1sm+svGuu+kiZ5dDu+QAvTgNrT2ivif27pcqQCx7uu9n3UTex0O8FxvZZs Oh7WeT0g5B9j+Fa/eCdfBkLZ8u5CAOcFAUGlFqjwMRR2J1ltH1+kYFo48PmZ2qrqeGfcmn/dDb7zQ Z6Q+f2+eiuy5RBeCf0bkYob+xMDtr6kbKiynxFQ5Of38HpOBsGi96y9SuUgF5FYtjIKm30mqFE0n/ na2bI0YEoAT33f/82nHxw1cNGULfmvCHoYEspfbr/2N+crHzykqMdhcdnXzqAkfprZ7Ymrn+z9TBx 9tDtHfKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8V9A-000w3b-Fe; Thu, 22 Dec 2022 23:38:44 +0000 Received: from mail-db3eur04on2074.outbound.protection.outlook.com ([40.107.6.74] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8V8n-000vKX-Me; Thu, 22 Dec 2022 23:38:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VcjN6cPJHJTHlVR3riOmYa0AuJpKtTolXt8EjYOLgumXVjzoQEZNXRCoyHy6i5wgz8Y55P85ejdRw2dYrM3exLPuJOCT4hNu1GzMW9bpJoadNM3gHGtOF8lba8MBIDKVgeIW2POMYCpyBYq/SlSRVTZXPaG17Zf2lAwd+QB3Bt3GdwV/rQkUavTT2jLOGCZLsoR0J5tbb62V4VNnm4iYVLv1umvWyf3IxXjHWGkPZPj5TEwH4OLK1BmgPlIZ92j7PTX50EK1QethImpR985ThsXYo7uoqauv9BEloZWO5/yEa5fPSQmnRJEdvw7AwAL71BRJtS/Rqw9728RrqGEtEQ== 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=kEBfPTZlgkreP+XuG4W5PTE+mzXKo0XwInNaxx9l5Ug=; b=ONOBXbnCTlhWpxClg+2/bJOnbKXAl6Xul99Iicb4E6gweKdaTejgL/rbhQxlONvqxBwW0rjpiUtOU0aBjHkIkUj+PJv88aY4LfoVb2Y2saTYtYE9n7hK+yQAsJAJdR9wcCfP5K/19hvVJzWvyF/3V1Bajbo4m1baMECPFgH+nyMUR2p5qhmPkkyePuEMyQrhq21OVY5UXyS7Rs7ppEO4hxj/i/Cujb5l6BoFYnJNq51zCywg+V32LzJMbZrICJ7ji6diVNjk9oiJ1+aAmYR1OcKieoZf2Imo++ftafEYT6cJlfQgErtFh3KdAdMmr/hGFKwRg5cbi0XtJOaIRmWrYA== 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=kEBfPTZlgkreP+XuG4W5PTE+mzXKo0XwInNaxx9l5Ug=; b=ZxYIWT8tdIe786tRfASDvM9R1Q3xQE8YVbETgwMcl/Vc7xXDgtb5SNXLBLyOWXxa/0Qy/rKFCdOdMvPb+whCL2WXZwtpxD4lLRRG/MOzxuR+txM49pJt94FH3lO7mtb8g3IdJKswxcIwdPES24yQhMbEZ5Ym2ovjsoAdyNI3x7wx85SpuB8XtUE6bbDJGRK7WOx2FcfLZeJXPh/n3JXmmcPEgFbS0GnorZMrhEFflhKMnRD8drc0y+NHvONqfyEZcmRGMeH4Wrqgvg+CZv8h0GagHupYR8iP4DxLUxWClja5SreVOzRMl33w1BA5h2wFdMfMrWsQABvNn63CXCYPtw== 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 AS2PR03MB9100.eurprd03.prod.outlook.com (2603:10a6:20b:5fb::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Thu, 22 Dec 2022 23:38:19 +0000 Received: from DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::2b95:1fe4:5d8f:22fb]) by DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::2b95:1fe4:5d8f:22fb%7]) with mapi id 15.20.5944.013; Thu, 22 Dec 2022 23:38:19 +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 v2 2/3] iommu/sound: Use component_match_add_of helper Date: Thu, 22 Dec 2022 18:37:58 -0500 Message-Id: <20221222233759.1934852-3-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20221222233759.1934852-1-sean.anderson@seco.com> References: <20221222233759.1934852-1-sean.anderson@seco.com> X-ClientProxiedBy: BL1PR13CA0205.namprd13.prod.outlook.com (2603:10b6:208:2be::30) To DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR03MB8847:EE_|AS2PR03MB9100:EE_ X-MS-Office365-Filtering-Correlation-Id: 018f03e4-a305-4ac9-25d9-08dae4759b07 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EF/GvGH/+mpcc1bpvYt1wkDNG/hy+mNOxiTWq33s3ALuXesewmsFr2yrdP/jD4vwQj70LvpL/Z0t9tHpQXNmR3LfB6zW3GJA7n89kW2mi5Om/myPJxrpQfj54xZVTAaBAgcllC+1t1KqBqvTojw+hxfBJIcCif3pAYJZEQL+YlSEfWTHqzVPxEu2tCvdn8yasLemLeUogW/x5KYZQq1grRrs4a53OgBHpzymffbEc2bpsRQeYzFQIlXE9PyoXs1FPjDrXugB+CdPNnmDsgbKovMolfxieTZlGFQXX7FTetNmacZbkTNcsI7imPyH9pXK78yjnCQ+FG9TCBFIWiBfq0Xi12jTQa1VQPrwiJqYfdq4xjcKOcPPGZM8taiM/2ZoVvLPrRBFsIMcOxOCZ9dBLiqrZshzDMnyPCuaAxG9lR26ZBHKejw5a4GwYERfZTAJ3oTLkc6DYBgXnrexWLPfvrGErADDcSLHcMP2yZKTD+J0MfCieQuayquCEfB54zWuOZwUvh/Csla1RJD6KvSgVR743RmTNRoeqmgZh/Y1EEXrqViBmkEC4lzLSvOb6gidm7IWD7C3na47z8tWX+wUv83VHtLeizJJSoZ67eEspAuhXK/liHWlqB9maDxVj6h8PbelJIWQjVbhoPQWgFIHJ0WTf4Ng6uxdtvOT3fn+gBn9KcZEKcKxSpLqH1uBrvq7EnYkPhmhXJKJLqtSaPMRiQ== 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)(396003)(346002)(366004)(376002)(136003)(39850400004)(451199015)(86362001)(36756003)(110136005)(316002)(54906003)(478600001)(38350700002)(52116002)(8936002)(44832011)(41300700001)(2906002)(4326008)(6486002)(66946007)(66556008)(7416002)(6666004)(5660300002)(66476007)(38100700002)(26005)(8676002)(6512007)(83380400001)(6506007)(186003)(1076003)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C+48QwAXZC5yEi/kr6vKW5Hd3jP2SDHfjOAYX2ARqLwijYLQ/c+jvATQvATVUgJDlPOwJTwUaG5/tWyHr0iGVh2w0ICX9ybdzwmLHVy7SKHOGfvfdNzkCep+vPgnM9Ci+fU2fVaTpx+hXgpyJ2Ik1BMu84sfzWCUtigMhZ3+dY4y5RipbccAQsxK9V838yXtK5nS/xQKznhIXmCgCNkmc/FEK16Bwd/zvjvHyFieYzXjuq/R+f3JmyCAL8sKk/cr1eR+tcce8BxkIt85Qg6l3s85get8b2xtMyh8rI3eaXi93u8DPbIlXgBUdRBlmjE0lYGmdO7Wp7y0DsoFjp10biIrFMTJbINnuwS4O02Sqpzqm3bYsA/X438a0HBj2oZgjIDTQ113vYLfhPnbRs/rPjxW1lwbOi4eVvWdVmcWHoAdmAN1LCC5k62XhSB6mF74gSFy8QNu0iG4RPQKQnFnX9JICLL7KQ8fMQGRQJ7E7l71kw5iaNdaGt0jFBUthp327EO8PHP53IBriXe+3YnKfmveZLK0vCSjB42u4sVuI2VeCEPlnYgtkb/bUABpR4udldVJ94lmOzvyg6NdzqSw02IBh/ZzeMMGBBzM+YwlgaViyDiUKdzrkRrsqiSnOuB4HL9YAoK7SjKgzBQaL9WlCW07zcMDucOOs6crzbMXT/xmg8KfUUQMk76v2T8y8OYkCCmWdzuFcvdyfS2yQ37IdMn1aW0W4ILpskPFyoKa4VBH660uaEY0DV/V53xBwsVKPRVIlI3Qc+D33nOHOSmEgOdt5JWwmTC8BHLHD5ZSG4esya1Vj8WVOFIYklQdN10puutnrHP5oR96LRTORskYcUm91055mf1qkRv5AaFeW0Zhrke8YF7g8jUxW4DimN/rITzsyR3CVYUgyAMQc8yzCs+fejJlGA5evXo3xRVdDSNhxRI4PD3Xvzm8jCR0bWxxJJi2GOE7JWyKzWFbJ4DB27iLMnJ8CB/xePa8bUg85wbRhiksPK5YVZ9ocPpbTcX1A03chZK4WQ0sIIEiK4bn1Tq3yTkwH2cvx0HK7KBT0O9lDz9ur7a6pQvtJzf5TNCcXiYc4JjIs1N573lSpyWqrF75dwlliRgcMzhzGYGbRuBpr9Men2AZ7ywxc4m6CupMvMp7lR4Fn9C5JADslG5+lhx1BmkCTT2dPT4e0+6DG1w8uLLdiapz7rMXysfrqCdVWP9G4K8GncO4HIRGO23PI/BQE/g92NQlFkc073gJbJeyD/EPl1DzsyjVbqbr1/ttRPXy+CBpFzue5Q2i0UbOSNbV+1+4vohB0IlKqq0eFLKLUW4jWdZNFMs4/yS4EtWDISy5ahWNETNOh8qtRTzMaucZhs7lMP63L9RHtoi/UPT4+qnBWbMyD1rZIggjy6F6Si1qSicBnyHOLRbCk5kRR0Segv+cv7yZM47/aXUWlD4n6o+FwFIvuFzO5x6rEDDvKfFOye4OJoy4pEejWr4C8pGA7iNfoB3Itdv/j/WXabrvJjoUVtF8Z6R6BusZ/il/yxm02fqJ7bJFFE83xfQFOYN0Z+ryacsvnX0QfUOMW3z4FztNEfeNoXViJWFcauJRQHgnyzNnOZK51NPqiiIgTQ== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 018f03e4-a305-4ac9-25d9-08dae4759b07 X-MS-Exchange-CrossTenant-AuthSource: DB9PR03MB8847.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2022 23:38:19.0662 (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: 6KSwa0DgHjRRJSl/fupxp2pWp/sBt+YZVyTw68BWlejvQiIUOr0MuPL3zt9Y6kiU6EIEh/Jy9IvQ7+wsLqxE7A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR03MB9100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221222_153821_803890_C209FBAD X-CRM114-Status: GOOD ( 11.51 ) 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 --- Changes in v2: - Split off from helper addition drivers/iommu/mtk_iommu.c | 3 +-- drivers/iommu/mtk_iommu_v1.c | 3 +-- sound/soc/codecs/wcd938x.c | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 2ab2ecfe01f8..483b7a9e4410 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m } data->larb_imu[id].dev = &plarbdev->dev; - component_match_add_release(dev, match, component_release_of, - component_compare_of, larbnode); + component_match_add_of(dev, match, larbnode); } /* Get smi-(sub)-common dev from the last larb. */ diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c index 6e0e65831eb7..fb09ed6bf550 100644 --- a/drivers/iommu/mtk_iommu_v1.c +++ b/drivers/iommu/mtk_iommu_v1.c @@ -672,8 +672,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 aca06a4026f3..2f8444e54083 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 Dec 22 23:37:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13080438 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 9ECBEC4332F for ; Thu, 22 Dec 2022 23:40: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=BJBQsgZqHySR5ZJFvpzCoSAiWyJRIXKFYrS/yNJi4yQ=; b=nwwFrfraybfrpbxaSn2AUR7u9e 8YtnH4wspt4DwjDr5YMu/jU/1dlbPLUoE6oiBAYJSjo5gsCp/vjatHH1gJrkh1438p4KyepLet6CX UIVJqmI4E5VvH5OB2C3O7K0ZRrHFF0IBW+4BC1iziWGiFqDnk6cjigWo0v91923kE5PZ19yG5uczz 22KRZdGUz5ectpVq3d/lKEAeJ9ePKljBX//wxc2J6Nw1HDw8rjjah3/SQyoZqJ6Bw7UMWWNNMXMtr QpqnobP46WvpM4fLcZJQQBl/8P9JVq1UZYcjPYvLLRPrIBfA0tuIHh39hjvNHwLh+3p0moiVTFW/d ppj8o2Nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8VAG-000xLY-BK; Thu, 22 Dec 2022 23:39:52 +0000 Received: from mail-db3eur04on2059.outbound.protection.outlook.com ([40.107.6.59] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8V8z-000vjs-QW; Thu, 22 Dec 2022 23:38:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iOB+cp/2ZenWVC56AXYvi0QMqLdjEQZZBxI/yX4ymCSj0bZwUAYrI9TmW/sylFQ++fBBgu9DDupqlTpeBX8rtK6RfVczLDn3rstdWudO4xBsPKc5Ccvzvqt1mWzxTb1HGftWgc/clG2T2XitntV3Ba8YOaV7eCBps4ZNbGPwFjI5cx5b7DiN4nMDmWudptRWXYIjpDRBZ520WDyKbpvXxCpx4c66xaVN9+Jo7C3TwcNjcKQdgyyBWodhzIPgM9wgWFyc+ZewahzNeCU0YXFDObDg1SWgUzeOoaC925nM2hyLZnr3sqmIWpBfAF32O4LZP8Osrrfdp9UECksKGLwj0A== 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=BJBQsgZqHySR5ZJFvpzCoSAiWyJRIXKFYrS/yNJi4yQ=; b=ApyPzopBuElCPf0QfJjnVclcgzjB2uF0LMQsxisQJlcqxUmJQEGB+z3+W8jxc+jSKbRYV6GsgFv7mg3ETzkvFE8c1o3U7gEouq/dJRi9/Zs9zworvZ+5uJWqFb+K/wBvZr7NLqcxNcGxYIsgG8cwt1i5basU7x0OlN/QBOZArT8AXiU/X4ANjAbUCOmdKvAvNw6jVAFj12ugPV7hhUTTgz891KwsK2VCA65GjCSnSrwcLzOoLXhGve1hXFfCRoijx2R2W6jctmLOqgPhDExS7x/1ofAIcqoDCDUx8xtyjmIsnMC6fy+rU62bfodVKxB9PtFuBnbJzp+W9HHUHjU5RA== 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=BJBQsgZqHySR5ZJFvpzCoSAiWyJRIXKFYrS/yNJi4yQ=; b=Kxx5V0tmSntBCR5hSadufXiJxVSI14CMpcTNTBsut77IFRn6JW35ARk4uwSINfjoAnDZ/iC2MIZ2x7W3brA6W+zIqg+5bucsCkArQnh2rVwrAhPqnW/mseH2lstFFQZVbTRvLL9r6byBMuBuVTCDNWV1ba440xGnlVrs6CWTQmjs2UghhluVykWEzIw1hYP0MISQAksrd5iiF8pod7M7zBSMr15370avBpk619nzmWJNz+r//lzLf9moexF+YnpjdhvrHQfUK23qB4hi+gBEKzxc5sxUc8oFoQcnKIwbfcC42OgQUEbZhUrQqRe5PfY9CPi3LkOZW6+JvHXhzRByDg== 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 AS2PR03MB9100.eurprd03.prod.outlook.com (2603:10a6:20b:5fb::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Thu, 22 Dec 2022 23:38:27 +0000 Received: from DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::2b95:1fe4:5d8f:22fb]) by DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::2b95:1fe4:5d8f:22fb%7]) with mapi id 15.20.5944.013; Thu, 22 Dec 2022 23:38:27 +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 v2 3/3] drm: Convert users of drm_of_component_match_add to component_match_add_of Date: Thu, 22 Dec 2022 18:37:59 -0500 Message-Id: <20221222233759.1934852-4-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20221222233759.1934852-1-sean.anderson@seco.com> References: <20221222233759.1934852-1-sean.anderson@seco.com> X-ClientProxiedBy: BL1PR13CA0205.namprd13.prod.outlook.com (2603:10b6:208:2be::30) To DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR03MB8847:EE_|AS2PR03MB9100:EE_ X-MS-Office365-Filtering-Correlation-Id: d0773e21-0506-45e2-4bab-08dae4759fd8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OrRzdtGzlbVhGjlo5VQbmcOe9GYWaj6poLsMUMKqln6CpLCtfojVnZEzlt0EYmhFJE/4bgQSL4Yb3LzedtCSpkEfD8E8yJgYsfW/dkkAoipxnSUUYJS42swEBpOYnZobMbg3Kw5m9ibz/WRuGH5zXbE+8An+gWn5W4n+d+tgcr6yX4ehIB10q/IxtR9fHIGGqYtIr+sH3MUPkcxC/B8X26BcrD0olI5fGTfLv8FFSDRKHpPaPZjOg2AVvsIDi5tBpgi2WnJRgvBLHYiOZB1iqginMqRE8O2xrpR5RRQMt7BMH5YX4CHateWIBGnR8KEec6NVEjH28a9g4uiEidK9XdthCKfhBFSXMkrmQPfLlxXVW9e6TmyDGGb7j2/G4fd8Z7CFoqCfWWZBn0ShHJSnaAwKKZffWivEyBJZqjIOqTy8w9VQJMDdnuS5ESA3QRCMvguNfH8g7aDV2W2IjxBd8KoZ7SfQ9M0aVIE0kbBngEfslCXHNfnIVTypjgtBTdLIzV53EmanjnCphaW57huFo57HCZIRsaisq/Y0xUNYN5SeumHKss/zw0URrz55KH6gcV5gt4eoukOORHjP3mzseOJVTWLXkCx+UaeAHq3PrSWNaOuOuI5ZFmFyF05nSyEeCT91wDN+Z761YRViHPvD2rWBAFcuApnt/5674UylUNUXOB2eZOj29WcUSZGl17OUqErlB22qHUt3i6lOimYufw== 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)(396003)(346002)(366004)(376002)(136003)(39850400004)(451199015)(86362001)(36756003)(110136005)(316002)(7406005)(54906003)(478600001)(38350700002)(52116002)(8936002)(44832011)(41300700001)(30864003)(2906002)(4326008)(6486002)(66946007)(66556008)(7416002)(6666004)(5660300002)(66476007)(38100700002)(26005)(8676002)(6512007)(83380400001)(6506007)(186003)(1076003)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?R3KPfUumMZhwtJrh3RH1rYmhPhfQ?= =?utf-8?q?FH/Q0P84wb/f8N+h7v42Lc69UAMcQ4P6yzJQ4P6x4BtGchupNM+OEnqppbLck9rJ8?= =?utf-8?q?GYDbD00eY4+HliVSpVgxr8e97bj683vUFoExMZxXFXkJc0YPz3m8sQutfBgYwNt4W?= =?utf-8?q?1uh7zhG0VCZsEcNNXL/Es7ZuGF9k2WVaLEYiaJOR4XpeGbnfpPPOhIfHI+idXBEdT?= =?utf-8?q?BNIrecvq4mv85wHZLWz2H1GYctC8w4K4jOAfCseFU/Z/CsM+Qk6I2Z4yApSRswoQK?= =?utf-8?q?7HG2tRgqNJK9hu7WaK8+ZvVl94sYE/c6+Jgx4DNZUcpRtuZ+R0zM7S81/NMwcQsN0?= =?utf-8?q?T1/gFa4X5+tFKa3sBaVUOWDd63yUgLYKYgvqegAbeNsrCl3KRGnV3t36dqp1Fd9D+?= =?utf-8?q?e8TmGEz7t1UnSQaU7pv4QA68zTmDJQQ54DuvjQ16t1w6L3yqPqY/rxC8EDpFGYPjq?= =?utf-8?q?PkDtjydPIuoEX5ezKjygoEmpuHuMuvJs1kLE4D/J6H0tRe/69jaryhtcyLjAxzzEd?= =?utf-8?q?qRc7wF3F4s+ZOyBKeTobzgJ5mN1H0iwZnNfkaqmkLF2dHGvxHWkl1fIpN6Rnp2zUa?= =?utf-8?q?MpsiLWmUD1YHRvDdwPaswhBY+Ve0CVWceWwxc/Q7bsuEAI5CkEWsKnz02EN/9Q0FK?= =?utf-8?q?Lw9xhb6r3LAAR+NFdNCwFoDWnxR9+4eLDopSKixdPj8JHx5qwywMNEI9mYUL5oaye?= =?utf-8?q?XXKdXK/nYhd8R0xGqM6dp/GZ2bsEJJ6izTisUqQBTSJF8linyQGXwdiXPln6jRQbv?= =?utf-8?q?wGJNdUCmewTfB8L4+f76nAl+eudw0BBZgDUN51nrayF8mPbL+clwPBnnlw/6Gf0ct?= =?utf-8?q?v9BZPV5HIHWl7ZPKUpuzLtEOQgbuJ5Tsh6cwFD/VjZMMls+hRtumVFem/ilgacOXz?= =?utf-8?q?NJpx2++2gR9bNA/KWpynsQHPeksvIWsw3INGYj3rjxO5KCVudNjGU+hyTKfkWPzzQ?= =?utf-8?q?SvA56tO0VfOJBkziNseeQXgboy6/svueJFxXulqbft90yoxIa5BP/eUJlQuMRkaXP?= =?utf-8?q?wnuq0HiB7h8XQ5ZbYALCIbqNcre3QeGFj7Jsei480MpCt23hPUHMvXKkXNwhzBPPe?= =?utf-8?q?BwHAcTf8vZbRsTRYOJq7gjmTY2LKtZdSh7kSFjGfzxIFJln1FZ7GvJha3Ys1GLmWB?= =?utf-8?q?9z+OwfylpsRmty2fsF34ppwdYctYF6BcI6gsKOy4UJ7RmZUzBE0AAj56nMtcePjne?= =?utf-8?q?xb8ee+XlhE39XLsyeMb+1XPcp+C48gSzs6NHUli2EztCQYWod5ZyqU9RXP4x3mETR?= =?utf-8?q?hZIT2WpYyPFhP4g/fdZaIf23AKmv0lbmRbsdkgW3oY/jn/q2EdLqKV7f0kFjowtgN?= =?utf-8?q?ccANuG+1YsL00XGvCl832aL4PYVudyNdUyQ63ctG/fpw1/7/LRGmVZx2w2ETD7YrX?= =?utf-8?q?F/qR7yQiDAxW/ESD2Y52zrxp/1xAqoiGhP5nX+w8bP0LXTAKXSdhwVmnwL9lo7o2g?= =?utf-8?q?jPwW+FNr/S9H/Kv86OIJlDClRyFoEsLVyNyKwlSFNTpZ7txTdKSn3H1kGotHJe8wE?= =?utf-8?q?Vkzf+t1W3kMoyLEd56g0QpbTg5//Iu/P2Q=3D=3D?= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0773e21-0506-45e2-4bab-08dae4759fd8 X-MS-Exchange-CrossTenant-AuthSource: DB9PR03MB8847.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2022 23:38:27.2123 (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: OoB/31SbI/ndNhK5KWP5CvXNmRWBgy3BSwSe+BIP+B121xOTVy1mGVC7xOz5CUd5661o8h8BpAZpH2o846h00A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR03MB9100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221222_153834_070770_8D1ACA46 X-CRM114-Status: GOOD ( 16.68 ) 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 --- (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 7043d1c9ed8f..fa37ca10c80b 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -353,11 +353,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; @@ -368,9 +363,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 *),