diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2021-03-29 13:50:47 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2021-04-10 21:43:02 +0200 |
commit | 4b2b4cc50ba6d607d1611ea6b2046a58d16e45eb (patch) | |
tree | cdb1f53c2f9f165cb82b62a593b6e52ed6081977 /drivers/i2c/i2c-core-base.c | |
parent | 9d383e96448dbfdd97a37e618f6af5a17a60ce0d (diff) | |
download | linux-4b2b4cc50ba6d607d1611ea6b2046a58d16e45eb.tar.gz linux-4b2b4cc50ba6d607d1611ea6b2046a58d16e45eb.tar.bz2 linux-4b2b4cc50ba6d607d1611ea6b2046a58d16e45eb.zip |
i2c: Remove support for dangling device properties
From now on only accepting complete software nodes.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c/i2c-core-base.c')
-rw-r--r-- | drivers/i2c/i2c-core-base.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 266b2013b1f1..d296b5000a1b 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -909,23 +909,13 @@ i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *inf i2c_dev_set_name(adap, client, info); - if (info->properties) { - status = device_add_properties(&client->dev, info->properties); - if (status) { - dev_err(&adap->dev, - "Failed to add properties to client %s: %d\n", - client->name, status); - goto out_err_put_of_node; - } - } - if (info->swnode) { status = device_add_software_node(&client->dev, info->swnode); if (status) { dev_err(&adap->dev, "Failed to add software node to client %s: %d\n", client->name, status); - goto out_free_props; + goto out_err_put_of_node; } } @@ -940,9 +930,6 @@ i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *inf out_remove_swnode: device_remove_software_node(&client->dev); -out_free_props: - if (info->properties) - device_remove_properties(&client->dev); out_err_put_of_node: of_node_put(info->of_node); out_err: |