From patchwork Mon Mar 4 05:16:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13580051 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2042.outbound.protection.outlook.com [40.107.113.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F6B4BA27; Mon, 4 Mar 2024 05:16:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.42 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709529372; cv=fail; b=NVBV21O+d9K6M+0NAzi8FxaTZ/PQCORNSdSTw6cTg6Y9FoKyI+RQnYOVvVdwXrD2ZWXqAGH1TcKOfK2l5pR+3xB3GpuM8DkO9sbsN1CDLx+F//oabGrT5GCq8htqnvzkz9RN1Jo2HED8C9VgtxitlO23Jx/9vaRQmEE0g2sC0tQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709529372; c=relaxed/simple; bh=ACJsB3c3uRSOq7fiK0+Topl1ll+h4vxSHGo6LRKP5ac=; h=Message-ID:In-Reply-To:References:To:From:Subject:Content-Type: Date:MIME-Version; b=a/ox2K1iBW+1Rj+nb5QsA6OX3OnrxVh9b7HRcLO42wBeGCRCYssLeOt5wiPwcThWXn5gR3IY4o5vFjzzSkk77+3CVbxoNlSa8vIyMReUXdt5WA3x/Z/NKPOw9JaukQ6csyHert0dJsSxgs6r2gA0+L1fqC6nSKz+wCU2G8OXyUs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=N5EPfGSq; arc=fail smtp.client-ip=40.107.113.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="N5EPfGSq" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G4sCZqc+KjXNPuZQWAi+uva8+E6krowfYosXTJpRYWzJKsO15dWKKuTux8sn7c++00eZ+4UFh50Jy/55QtdX0qbOx5th2qT8UjixXjTDzH2Gu1gBDhTXu11MPVJZdRQPTKx++45Jg229G9MN71iLldUN+vRz94MNmF9fU1M6E41VWkreUG/aVJcjCEz2eyGhyvwh/UtU7oguSVAc1lsOj8JhSALihUGpJ7NGkL4cEyt0zTNCavEzNd4VSLmQGxAojL0Afzmz8Hl1RUJKkiVXnVHeR/1MsvnuUiJNUDWbIVcNy/v56ZdWrIXArJDh5Mb7JPdsRY0c3VpVs82/5PYYMg== 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=o7lQcPCnpEicxp36lyHMSuSuqJ+WxW2JpXlU2FrAGS8=; b=LHSxpSJFiaasUmo5ohk9AL/DlpRsGvpUgoJ0p9kO19CGQncRoNxv4kjlPX9YlXownuzjjY5WLdozl9evncKCCCPc+aMMfv5BkMbzAJQSoI2DQR2drAHivYrntzh1ceMdmXo2okdDu7H6Hn3bB8sldOgTbhpAb+s9zjtDs7cBucdbSzVf9RmXq4wozMyYpaTqi86Gz7RkFa+n1LYJRZrhXDbSM7zPqhKO7Wu9WpRbLFyxYNcLXhUEbqcrmPyc0wqPkCtWPWmxGRfCQLs7ggxlr3n4DO1BBTpJ0MRiIy3yhDt5IuKLO1BrgT1PcYOeQMc4fOkLPyG0FHeEPQ8p2P6Lew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=o7lQcPCnpEicxp36lyHMSuSuqJ+WxW2JpXlU2FrAGS8=; b=N5EPfGSq/blXTa5/njJulfBb5IZmZTlpM3dYZfd4OQHUMZT5FjzyO0fhAEV/v6OQ0veTIcyHEKcstM0Rat/UfPxX4CTt3LMktwCmKjCbqpFA/BHLalsgL+YTtftuh6Q8rj+ChR5jjn7wsVhXrKhJp3l5ewJ0AE8tkAYWdVM9yUc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by OSZPR01MB6616.jpnprd01.prod.outlook.com (2603:1096:604:fe::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Mon, 4 Mar 2024 05:16:06 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::1934:4a38:d599:33a2]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::1934:4a38:d599:33a2%5]) with mapi id 15.20.7339.035; Mon, 4 Mar 2024 05:16:06 +0000 Message-ID: <87msreh90p.wl-kuninori.morimoto.gx@renesas.com> In-Reply-To: <87plwah92n.wl-kuninori.morimoto.gx@renesas.com> References: <87plwah92n.wl-kuninori.morimoto.gx@renesas.com> To: Rob Herring , "Lad Prabhakar" , =?iso-8859-1?q?=22Uwe_Kleine-?= =?iso-8859-1?q?K=F6nig=22?= , Alain Volmat , Alexandre Belloni , Alexandre Torgue , Alexey Brodkin , Alim Akhtar , Andrzej Hajda , Broadcom internal kernel review list , Claudiu Beznea , Daniel Vetter , Dave Stevenson , David Airlie , Eugen Hristev , Florian Fainelli , Hans Verkuil , Helge Deller , Hugues Fruchet , Jacopo Mondi , Jessica Zhang , Krzysztof Kozlowski , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Coquelin , Maxime Ripard , Neil Armstrong , Nicolas Ferre , Sakari Ailus , Sam Ravnborg , Sylwester Nawrocki , Thomas Zimmermann , Tim Harvey , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com From: Kuninori Morimoto Subject: [PATCH v2 2/4] media: i2c: replace of_graph_get_next_endpoint() Date: Mon, 4 Mar 2024 05:16:06 +0000 X-ClientProxiedBy: TYAPR01CA0032.jpnprd01.prod.outlook.com (2603:1096:404:28::20) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OSZPR01MB6616:EE_ X-MS-Office365-Filtering-Correlation-Id: 3cfc520e-d541-46b4-2f39-08dc3c0a31fd X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vMQgnG0E2+Fg7Xx9hs1EciMqsd4hE6/ZRy9ED+wMk/NOsIzipLur5RhVErB1W0vgY6C9Uf35kaK3n1c5rR3QE6Sx4xuLhNzusNOrG1Ztl65K+z5vnQEYXL+9gzDka0eGvoZ/a/Asiygm2uzkBnLf0+l7bUEQnGtRskMzHWoxz3T0gRR4XlSJ2PKkTXjg5DdfMhkVOa4WgELd3dKcFM/E3QZfxUBkcJA+GA4pBcvcyllAmMTWc/nQancksOA8kJ0VXegJiDH8HMo+IKNAzLBCPKgArFXxINHk1U8jaA4L2s+nsCDMFU/hNIrfnKt1WVR1UOyh6FFoVekH7b9pMqMqCLqHFYsES+58gfCQWu82UM965VTGRZ/XlGI9lvLzm/jT0z8ahOmM2s9YnXiNkPBSV4Dqu5Q12a3tS6JMLprfBlq1YrzjZJBti+R5v8nLN33mZqnZs20PGQPV62Xt2WFKJsbOJgpZ3lAVS6HPoEN8QzWzUZvRmjWwTWBuH2a9ZCizix7zFi6lbFQIfcginZdzsryIYMUklBSpCJQg43y2/Wun/PiPXmISJnTWiC27n64vpSG1En6vUWJBiIBTOOhMlgnjFKuyaU2VxSBckhEu3WuVy/itLVCwJFye7DNAaPSw+/gn7TbQMkfUuIwk3hQciZbaQXkGjfLYHxw6dP7005Uhkdph5yi7saEZhDnyGDNC X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UXqbD4MipEzUTLVcsVsncL99vRmxLqQjAoaiEcNqUDfjEzCry7NK8RD7/gzkFx2S/6KUMCa7nY+hASSICr0Hz8BpWine93SJg4J8JNn4yVl/YhMuDuTVj5+HHh1J4DHZ9xJ4x0xIBXt88a6B85k7lr305jVGVHY/ojF43ZqGWaQ2PH6C8VJNQz7gP7XXeFBjBOtst7CfwjkDWD3I21SXI5rgRLsMSmBiV3YzSWdV98htfbpuIhQiG1KdXQvgUkYAYTA10/bffmtMoyeU4+4n7JunuMIzDgk18A9+Y8wLZBeDnCpDwuzf+EX7aIJBy3JA4EQfNyUZqp6NQGgWyJHLvRbiTeVn2qI/J62kklk9rKOunH+Eewcf1bK3ci+SqGWPH3YiJiIqw4DZpLGmaJuzTSDuBEyGz7n3l9Ii0BmU4HXPD++iuJULlWmqrRv+wuYGgagHyak9V9iA56rz8yjdy+cVfu7IM2pJgo7VV6vYgJX56OW9NJ476EHIFR/jhIqp8Edb3eWYpNV6cpfVqHs4g3GRvtUmv1G+WKkVeoMLGFHCjVr989S24j2ZQ700wmuVrLWw1Ft4TfazPF6BGm9580ozfG6upq+lhuikueQAmdN4XFly28MX4xJAsq818ghe014mzQtH8/flcYsrH3OYrVN5YkizlrjEl6xlMBE8QtqBem6/nYn+JE+DKIy3od9JxSF4fu5Fz3AcBae0TJZJwp9JGPpunPGWvAWaaRKSR5ZiE8eZ9kX+kDLY3ZzXt4pTkv0QMUyYzGqvnz84/G6er6itRleOZ++urNvG7ueSCPeAfI+F3e8Qb3uAgYuO4Uw6bYkumBZtu3MEFnL32HZeuIB8HujEK0VDdLwSYe83uhZRZr9vCBbfDwYvU4Fs28vwqMm/8BIEThL5dCE2H8ISMf57VpjdThxEHP0iASIlASFByKHfu5NXNbBY/k6h2maG8xPtjQ8EygvOBQQ5uz0rDaJkcqpWOgxBmK+den0NJwnsKnJOOpU0gNd9JERUfw0OEXpUPEJhaxbhjrHPdL1ynDe6hZDDa/gSoUoEfEgeowO+WMXSlHs5xH5HL+TkGN5sg8B5Iquy9mQtNvS5vWizX1qA37aPa8pWYGe+UssvYrCK9W67xYEj5UWumjzfaPOtcB1LcT+uaSXz3gqVOmuM0INWO2HgG176NE/NO+i6Q/JzcuqHN5Fno5ThP/q/3O0UGLDhJG4n+6Sjt4WrYS365Ra2h2vgie7EcWNY+rtM6sifIIzR+hy0bbOF/Fq4GQcLutCStJSSjDtSWTsl0F1i2WYSBYIyYFKzXkExSDBDZVCvrMjQbKQHrjdycdOMZxUkEkPMH3ZDpDK9Ko76ZbZsR0FOtuAl8LsvEqJt8w4WiqS3AhO0GF+b88wq2oWTXhidXFXpCgdYDwsGlh9SU9APi14Dn1++dwGI2bRnUWiDxND5IkuYG48ddt8VjG8AFWxdQafvZbzjcw5ZCjdt7yekQynon7DNBHmBTnkQMSebi+8jT7Ee/I8AhYPw8fwURS0/wTDxgwdaHCAc3q55ctuNIT2rnTazTTKYH9qUtitQlLNu14bjb5538GxPmHQ4k/gSIYVaX810Qx/aVb1vaSGRGxUBDNfoJasauvRQU23UFls= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3cfc520e-d541-46b4-2f39-08dc3c0a31fd X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2024 05:16:06.6957 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GxCmLzoyJofO0FH/kVpjPHZJjf/dNripP3SiH/vZHCfgJ8teAKn7lOLTMCig7SykywsUgQm1yG+mNoYNe1QGn6HMItJ5aNgVgyTUv7xC+L9Pb5reya9eM0gd8WkZ27Bm X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB6616 From DT point of view, in general, drivers should be asking for a specific port number because their function is fixed in the binding. of_graph_get_next_endpoint() doesn't match to this concept. Simply replace - of_graph_get_next_endpoint(xxx, NULL); + of_graph_get_endpoint_by_regs(xxx, 0, -1); Link: https://lore.kernel.org/r/20240202174941.GA310089-robh@kernel.org Link: https://lore.kernel.org/r/9d1e99b0-892d-4a72-a9b3-886b8ed094b0@xs4all.nl Signed-off-by: Kuninori Morimoto --- drivers/media/i2c/adv7343.c | 2 +- drivers/media/i2c/adv7604.c | 4 ++-- drivers/media/i2c/mt9p031.c | 2 +- drivers/media/i2c/mt9v032.c | 2 +- drivers/media/i2c/ov2659.c | 2 +- drivers/media/i2c/ov5645.c | 2 +- drivers/media/i2c/ov5647.c | 2 +- drivers/media/i2c/s5c73m3/s5c73m3-core.c | 2 +- drivers/media/i2c/s5k5baf.c | 2 +- drivers/media/i2c/tc358743.c | 2 +- drivers/media/i2c/tda1997x.c | 2 +- drivers/media/i2c/tvp514x.c | 2 +- drivers/media/i2c/tvp7002.c | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/media/i2c/adv7343.c b/drivers/media/i2c/adv7343.c index ff21cd4744d3..4fbe4e18570e 100644 --- a/drivers/media/i2c/adv7343.c +++ b/drivers/media/i2c/adv7343.c @@ -403,7 +403,7 @@ adv7343_get_pdata(struct i2c_client *client) if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) return client->dev.platform_data; - np = of_graph_get_next_endpoint(client->dev.of_node, NULL); + np = of_graph_get_endpoint_by_regs(client->dev.of_node, 0, -1); if (!np) return NULL; diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 810fa8826f30..319db3e847c4 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -3204,8 +3204,8 @@ static int adv76xx_parse_dt(struct adv76xx_state *state) np = state->i2c_clients[ADV76XX_PAGE_IO]->dev.of_node; - /* Parse the endpoint. */ - endpoint = of_graph_get_next_endpoint(np, NULL); + /* FIXME: Parse the endpoint. */ + endpoint = of_graph_get_endpoint_by_regs(np, -1, -1); if (!endpoint) return -EINVAL; diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c index 596200d0248c..f4b481212356 100644 --- a/drivers/media/i2c/mt9p031.c +++ b/drivers/media/i2c/mt9p031.c @@ -1078,7 +1078,7 @@ mt9p031_get_pdata(struct i2c_client *client) if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) return client->dev.platform_data; - np = of_graph_get_next_endpoint(client->dev.of_node, NULL); + np = of_graph_get_endpoint_by_regs(client->dev.of_node, 0, -1); if (!np) return NULL; diff --git a/drivers/media/i2c/mt9v032.c b/drivers/media/i2c/mt9v032.c index 3ca76eeae7ff..e9f5c6647f97 100644 --- a/drivers/media/i2c/mt9v032.c +++ b/drivers/media/i2c/mt9v032.c @@ -1006,7 +1006,7 @@ mt9v032_get_pdata(struct i2c_client *client) if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) return client->dev.platform_data; - np = of_graph_get_next_endpoint(client->dev.of_node, NULL); + np = of_graph_get_endpoint_by_regs(client->dev.of_node, 0, -1); if (!np) return NULL; diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c index 1d0ef72a6403..d1653d7431d0 100644 --- a/drivers/media/i2c/ov2659.c +++ b/drivers/media/i2c/ov2659.c @@ -1388,7 +1388,7 @@ ov2659_get_pdata(struct i2c_client *client) if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) return client->dev.platform_data; - endpoint = of_graph_get_next_endpoint(client->dev.of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(client->dev.of_node, 0, -1); if (!endpoint) return NULL; diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c index a26ac11c989d..9daf06ffedf4 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -1056,7 +1056,7 @@ static int ov5645_probe(struct i2c_client *client) ov5645->i2c_client = client; ov5645->dev = dev; - endpoint = of_graph_get_next_endpoint(dev->of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1); if (!endpoint) { dev_err(dev, "endpoint node not found\n"); return -EINVAL; diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c index 96c0fd4ff5ab..7e1ecdf2485f 100644 --- a/drivers/media/i2c/ov5647.c +++ b/drivers/media/i2c/ov5647.c @@ -1363,7 +1363,7 @@ static int ov5647_parse_dt(struct ov5647 *sensor, struct device_node *np) struct device_node *ep; int ret; - ep = of_graph_get_next_endpoint(np, NULL); + ep = of_graph_get_endpoint_by_regs(np, 0, -1); if (!ep) return -EINVAL; diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c index af8d01f78c32..cf6be509af33 100644 --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c @@ -1568,7 +1568,7 @@ static int s5c73m3_get_dt_data(struct s5c73m3 *state) "failed to request gpio S5C73M3_RST\n"); gpiod_set_consumer_name(state->reset, "S5C73M3_RST"); - node_ep = of_graph_get_next_endpoint(node, NULL); + node_ep = of_graph_get_endpoint_by_regs(node, 0, -1); if (!node_ep) { dev_warn(dev, "no endpoint defined for node: %pOF\n", node); return 0; diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c index de079d2c9282..6b11039c3579 100644 --- a/drivers/media/i2c/s5k5baf.c +++ b/drivers/media/i2c/s5k5baf.c @@ -1849,7 +1849,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev) state->mclk_frequency); } - node_ep = of_graph_get_next_endpoint(node, NULL); + node_ep = of_graph_get_endpoint_by_regs(node, 0, -1); if (!node_ep) { dev_err(dev, "no endpoint defined at node %pOF\n", node); return -EINVAL; diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index 2785935da497..872e802cdfbe 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -1895,7 +1895,7 @@ static int tc358743_probe_of(struct tc358743_state *state) return dev_err_probe(dev, PTR_ERR(refclk), "failed to get refclk\n"); - ep = of_graph_get_next_endpoint(dev->of_node, NULL); + ep = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1); if (!ep) { dev_err(dev, "missing endpoint node\n"); return -EINVAL; diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c index 1ea703a9909f..8e4a0718c4b6 100644 --- a/drivers/media/i2c/tda1997x.c +++ b/drivers/media/i2c/tda1997x.c @@ -2310,7 +2310,7 @@ static int tda1997x_parse_dt(struct tda1997x_state *state) pdata->vidout_sel_de = DE_FREF_SEL_DE_VHREF; np = state->client->dev.of_node; - ep = of_graph_get_next_endpoint(np, NULL); + ep = of_graph_get_endpoint_by_regs(np, 0, -1); if (!ep) return -EINVAL; diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c index 5a561e5bf659..f9c9c80c33ac 100644 --- a/drivers/media/i2c/tvp514x.c +++ b/drivers/media/i2c/tvp514x.c @@ -987,7 +987,7 @@ tvp514x_get_pdata(struct i2c_client *client) if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) return client->dev.platform_data; - endpoint = of_graph_get_next_endpoint(client->dev.of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(client->dev.of_node, 0, -1); if (!endpoint) return NULL; diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c index 30831b4b56d6..6a04ffae5343 100644 --- a/drivers/media/i2c/tvp7002.c +++ b/drivers/media/i2c/tvp7002.c @@ -893,7 +893,7 @@ tvp7002_get_pdata(struct i2c_client *client) if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) return client->dev.platform_data; - endpoint = of_graph_get_next_endpoint(client->dev.of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(client->dev.of_node, 0, -1); if (!endpoint) return NULL;