From patchwork Tue Feb 6 02:55:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13546557 Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2104.outbound.protection.outlook.com [40.107.114.104]) (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 23BCD1EB48; Tue, 6 Feb 2024 02:55:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.104 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707188133; cv=fail; b=VrzcYttfodjErmZ0UQYTa4ydW6OMxFv3LRj2QnUvSAW66504Mez2boCBrb+7fsXis7RjWafP/JmxXpzBYRW/xhgrLN+Ie0VQ385wfm3Q5gT4WAvfjToHwLnBOmCEzypEu78HjgPKJEi7t/m1yuvsEmSWqX7J93UvYOGrL+Tluco= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707188133; c=relaxed/simple; bh=R73+MzhVHqlPvgnu/5M92gc5CYa1g5NE9qIZS4AJp80=; h=Message-ID:To:From:Subject:In-Reply-To:References:Content-Type: Date:MIME-Version; b=fi4P8zPbJLvvoA82OXnddp1RurmmYwx+BR+0p5w8qNuMwdK15DgYlMeupY+WFyGO1WOllkpzV5ijzWwN8XFASV8PpeOVWm9jS1vAsr08fCpO3S75nStdu/IPIXKG/sMixbUhhosTzQZEcptg9updVN3aZQWXuxuAJSE3o+wBe34= 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=NAr3Vr4C; arc=fail smtp.client-ip=40.107.114.104 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="NAr3Vr4C" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D1bHpwruqJ0OOZuDSty6mwCooyYXCJ0xqCh9VuO+eKakUpStSuXNy/6BD6HnQ62gcNm5ZmjWh50rkCBcaE0/CP0IhfMlAdT/5sNqLMGansaxN7WRhQjMcrttUQwjJjCgGB0a4gNOUyd7zdflKBaVpIrXvJ9XXQt6Obi2bRf4mA2mBzR/AwABoxtqhD4u8Qii5d3X0qIlcJsNE/FaBQN3I4HJ27MMduc+Z8xBbmDknckyUEIeRGwbuQjsxgi7PahoIMJ3DNF/emExTNL8WeyXKML2NVp+OR1Ijz+GGFzodX7DTJHfNmRSKi2lsnUImanMluRAgiL2gEJvtX5QE56HGA== 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=1VV4/ffkqO/ev9swuxYLRk7E6rz5r7KxK+E6dLyxICk=; b=h0CEE6cYMm2o7PPhz9jNedR7sG0cPcDNN+YscGKv0hutBMp94GwVgM04rWGt2f/JKV3voNjJuTT+274MTKaAJ9HAsE2zHOFj9QnmmNuIhGG4n55/9B/dVjsNFP2bFWmwmVJbfhs8I4Vj6Rvq4YBakEzwn/6sE7RnybH6ulA5aDSt2ZSmT2f4Opkz40A/z99RfyUYg/j1KUUOkYHFXUmQXgBBlnoVpip0EIs9kv/Y1sPJY1xb5hwtMWDw5Um5WpTBTH+dk6FjCNUg6FJA90j75dN3N8lvwy6ACPI0wbFPzWX7FPdtYGWB8r4pf05In4MGR6VO0h47jMwbwlF3Bbtg6Q== 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=1VV4/ffkqO/ev9swuxYLRk7E6rz5r7KxK+E6dLyxICk=; b=NAr3Vr4CmsBtFM/AykJxkPKtd0sExk/LMWLF5kWNU6zV+7RkwXNsTQfc4/ZfUoPMUMcQWUbBfiVYMRsLY9eniH9Bavk4c8qZ0ZAnmpTNnsSrDxLC6fj6vZ09vIZuhxtHrLukCjHh1Muy5ND5ccsoj8HJFs9lRBijxdYtbZQsxps= 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 OSZPR01MB6229.jpnprd01.prod.outlook.com (2603:1096:604:ea::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Tue, 6 Feb 2024 02:55:28 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::4d0b:6738:dc2b:51c8]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::4d0b:6738:dc2b:51c8%6]) with mapi id 15.20.7249.035; Tue, 6 Feb 2024 02:55:28 +0000 Message-ID: <87r0hqnvxc.wl-kuninori.morimoto.gx@renesas.com> To: "Lad, Prabhakar" , =?iso-8859-1?q?=22Uwe_Kl?= =?iso-8859-1?q?eine-K=F6nig=22?= , Alexandre Belloni , Alexandre Torgue , Alexey Brodkin , Alim Akhtar , Andrzej Hajda , Biju Das , 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 , Russell King , 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 2/4] media: i2c: replace of_graph_get_next_endpoint() In-Reply-To: <87ttmmnvzh.wl-kuninori.morimoto.gx@renesas.com> References: <87ttmmnvzh.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 6 Feb 2024 02:55:27 +0000 X-ClientProxiedBy: TYCPR01CA0044.jpnprd01.prod.outlook.com (2603:1096:405:1::32) 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_|OSZPR01MB6229:EE_ X-MS-Office365-Filtering-Correlation-Id: 175882e9-a46e-402c-133c-08dc26bf12fe 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: I9CG1AY4LPhmLxU1AF1EcNppoDbuXCN+jyR/tar3bGOMeAleqIgn5ZEFPVgWjCGY2ahA2V3Bt18ChK5+SmpJKt6VzIWdApyQGrjGWUiwNRlOD9l1XKDc2ZWUdpBkCG5Jy7UA2SzFyKOG+HcMF/w4EUQ/O8nByzBKo5Zc36SategG0juNKSenvJ1DmgoRpXVdmampw566+pSzqwP+Tq46QE0bizBVJ6mes/4JO3Yu9RB6PdkI9vDuHayQ8Qfl73eJVCTipWQJEy7SCwMSjRcs5zXGcQT7lqkAA5fQAkEeKMQUY78mTwVllbuz7ypVRU5x+8BFD1IhPpr+Swt/VmbDKix0rbMz8Fg0pCJjTgmh2XHidt72JnfG1aPouYU2ZyaATwwRQ/QsvJWddSelOJY9U4gzoyz2pVvaQoPzBKvT5PMYGlZEC8GIMMhbl/jDLKAXvWn5WdCvvDhLctEuTH/mhmTxlQjV+HTNww7CIfzvt0RfKPrTI0tNOSqnx1BLM4gR7mCSAitRl9eSzKCAsKm9VKGJQuIY1b9qzmHpxjcumrQfmMI0dRXYjNIzLR8Lz0EiozFwVbU/xKaGKhYmuHOogmneQ5OCbEfEE+/JR/jHZpSWUzRE0GYsbVF6Hms5MTUW 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)(366004)(376002)(136003)(346002)(396003)(39860400002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(38100700002)(52116002)(6506007)(316002)(83380400001)(26005)(86362001)(2616005)(41300700001)(8676002)(8936002)(6512007)(36756003)(921011)(2906002)(478600001)(6486002)(966005)(7416002)(7406005)(5660300002)(66556008)(66946007)(66476007)(38350700005)(110136005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XQfCkq7sVUFlm3rLzOx2aK/Ifw1fo0aMCW/vY/p/+L5s2uPtrWyLqjRhzD1bKRlFCyBADdzJNOTprmolRqG2AYkyFQfnDO/vTU23hCsTAu5bpbWC+BFp2ToBWSVL4CaRE3yI39KtbwwSg0iodyVEcUHUTV6CDnBfFk08NNwLVA5NZSr2zFHW6nBgwbK4oUcoXpO6MUyncg/jJ42cUykFKNdsEKeWTbMWzOISqWJNwnQfHGAzf61k3OGRzmysC35ewiOXswPq0vx5375UgOMFUr6TGiEpSG1H4VX/tlqkFnc8/NKRCvoviIPyaZTCgh3TEgu5aHyx5pIrt94jjDDYCkz+5aY1ZuD35OJVoTw8NhxvDf3ATeTMq3BFFM1SNtU6ts/HHnjxq6SNcA3ppHkvZCT2eksz3/ASI/cx07bOyFUqaBdBDzqa2yK8mjuaaOFKPhpyc9sYxbZfVW4vebgUYIXjaD7EySJnV6Xrse8l3BNhuIPxJyQzFCzZXnRe/T8idIl2Q6YwI5AYfHMMY+s/+5x8pUc4hikU3t1Tw30kC3wpobreVjWVIyialLPKObzSlZfbR4HbY/mMuyrlwl5NiKyj3GkZ0wXsIi7VGEhanoWnpQSKl1WK2h050BQwh4GFy5SjQ8QraxHGJe5L0r5emuv2MA8faLDOdh/HKDbVcT5/Um0LrEXJGYoKNkx+YQIwSdRshkV+d2NcwI//2OCFY4ukiVwrE9rWG+KBW4qnnJJKKZYKGibPrbigOOz7RDiZQscftM1ewsbUe8JYHZeyragCyRdn7/8sJZLadPvQJV+Xbfrnu7XBtisrsS/PGmJNu57Thj2wEVTplUT0+0lO66gEEhfJYjK/Gq0qvs5U12ZvY4BHmIm1CAna1j5YYcU+S4DeNCB84hN5gfwLnmOfpkj+btre9F6Vw9dMQszc9VE2pMfTZIouI6WaKwEveJUQpUSpyIiN95UliHOSF7rNqW/sKckGDovBgI8QopU2pftPFRN1/EJnJXnwn83bAkfHqKWDSppfDwCesyoVsQuN03GfOHypD1xMdtZdsUfwcI+HQDezd6Ao8p+nuK/hRHHgAKbJhg84NjT9nE9Z9L5RQ/9uVg4J7o06lt4V6zFOaO87yeeFv2iNNcp9jKgo/gMYXytossYuw7h8alLITi6NPAVUblbgE9d6wbXpdO7k+c22AWkmUBohl/uP2tjrgikNv14b7ZdnYDJOHKdmNI5Gj8TmsHJXTCtX58obEDIjN+s6ef9vuFPXw/v0kr0Jihqhp1i1l3PJ/Gy2dpNiI/ajFQYW4whwcLUHKR0cdTjImewWfMouWia2V41eMR+5ZbajdaYPlUUuhGqw4RY/UQh7SuFZF4LVrTSliP8ZFqlo5PW7liGGL52uMj6TpvjeepqPPCDoyGCdFkmbUTS1KqI/eQDQKHX1zzfx5VhGPoRJvs4Db4gVeGmcRjyrD04VEyG+/l/xaoTr7GxPytM7fcPCzcTwTE5pdqgM7CbDahUEUlNnLfCi+4tYbrxgWbvf+49Ngm/x6U76QqM3C5O7/1NZX5UdRVhS9j/vloa97IwupF1yfaM+pZHD0ldojLK4Iav1vmZR0saf5n11dI9ij9q3PDtXV1VF1PiQrJ4ken2Gkzs= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 175882e9-a46e-402c-133c-08dc26bf12fe X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2024 02:55:28.0183 (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: 7/3adFv4Da0JJ6VZpzYovWRMrwR0SHnM95jHfC9dAqtjni0siTPdGstDMZ1inWe6nxvFN1pMkfUe0a8aM4J/Y2k29z9fv7M48Ijc2K8KeHNmqOq6u4KZfebzJ414NUWl X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB6229 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 Signed-off-by: Kuninori Morimoto --- drivers/media/i2c/adv7343.c | 2 +- drivers/media/i2c/adv7604.c | 2 +- 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, 13 insertions(+), 13 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 b202a85fbeaa..dcfdbb975473 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -3205,7 +3205,7 @@ 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); + endpoint = of_graph_get_endpoint_by_regs(np, 0, -1); if (!endpoint) return -EINVAL; diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c index 348f1e1098fb..c57a0d436421 100644 --- a/drivers/media/i2c/mt9p031.c +++ b/drivers/media/i2c/mt9p031.c @@ -1080,7 +1080,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 1c6f6cea1204..14d277680fa2 100644 --- a/drivers/media/i2c/mt9v032.c +++ b/drivers/media/i2c/mt9v032.c @@ -1008,7 +1008,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 2c3dbe164eb6..edea62a02320 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 a70db7e601a4..31d214bd4a83 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -1053,7 +1053,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 dcfe3129c63a..beab2813c672 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 ed5b10731a14..aaec5f64f31a 100644 --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c @@ -1555,7 +1555,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 67da2045f543..af7e49e6cc5b 100644 --- a/drivers/media/i2c/s5k5baf.c +++ b/drivers/media/i2c/s5k5baf.c @@ -1836,7 +1836,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 325e99125941..662efd5e69b9 100644 --- a/drivers/media/i2c/tda1997x.c +++ b/drivers/media/i2c/tda1997x.c @@ -2307,7 +2307,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 c37f605cb75f..b1630a6c396b 100644 --- a/drivers/media/i2c/tvp514x.c +++ b/drivers/media/i2c/tvp514x.c @@ -988,7 +988,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 a2d7bc799849..8e58ce400df2 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;