Skip to content

Commit

Permalink
x86/platform/intel-mid: convert to use i2c_new_client_device()
Browse files Browse the repository at this point in the history
Move away from the deprecated API and return the shiny new ERRPTR where
useful.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
  • Loading branch information
Wolfram Sang authored and Wolfram Sang committed Jun 19, 2020
1 parent bb7d93f commit f04a5ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/platform/intel-mid/sfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ void intel_scu_devices_create(void)

adapter = i2c_get_adapter(i2c_bus[i]);
if (adapter) {
client = i2c_new_device(adapter, i2c_devs[i]);
if (!client)
client = i2c_new_client_device(adapter, i2c_devs[i]);
if (IS_ERR(client))
pr_err("can't create i2c device %s\n",
i2c_devs[i]->type);
} else
Expand Down

0 comments on commit f04a5ba

Please sign in to comment.