diff mbox series

[2/3] i2c: use only 'fwnode' for client devices

Message ID 20250519111311.2390-7-wsa+renesas@sang-engineering.com
State New
Headers show
Series [1/3] i2c: powermac: convert of_node usage to fwnode | expand

Commit Message

Wolfram Sang May 19, 2025, 11:13 a.m. UTC
No client sets 'of_node' anymore, so we don't need to handle the case in
the core anymore.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/i2c-core-base.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index dc3c60a7d382..63ffde07a143 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -961,7 +961,7 @@  static void i2c_unlock_addr(struct i2c_adapter *adap, unsigned short addr,
 struct i2c_client *
 i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
 {
-	struct fwnode_handle *fwnode;
+	struct fwnode_handle *fwnode = info->fwnode;
 	struct i2c_client *client;
 	bool need_put = false;
 	int status;
@@ -1005,7 +1005,6 @@  i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *inf
 
 	device_enable_async_suspend(&client->dev);
 
-	fwnode = info->fwnode ?: of_fwnode_handle(info->of_node);
 	device_set_node(&client->dev, fwnode_handle_get(fwnode));
 
 	if (info->swnode) {