]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
i2c: use only 'fwnode' for client devices
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Mon, 19 May 2025 11:13:13 +0000 (13:13 +0200)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 20 May 2025 20:49:31 +0000 (22:49 +0200)
No client sets 'of_node' anymore, so we don't need to handle the case in
the core anymore.

Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/i2c-core-base.c

index 32ffd12bff9fc78a0e52b08bee199359a3453b67..5f6ff35a27071f2660a0c9ba413305a4b9b6c612 100644 (file)
@@ -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) {