summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2020-06-15 10:58:12 +0300
committerWolfram Sang <wsa@kernel.org>2020-06-19 10:20:25 +0300
commitf04a5ba1752512a46ffb61b88a8fa7d4ab7e02f3 (patch)
treee44de49518709ee5206c0cb92a7d73e489e35cca
parentbb7d93fff62f32f4ff0072b2ace695bd5f5137e7 (diff)
downloadlinux-f04a5ba1752512a46ffb61b88a8fa7d4ab7e02f3.tar.xz
x86/platform/intel-mid: convert to use i2c_new_client_device()
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>
-rw-r--r--arch/x86/platform/intel-mid/sfi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/platform/intel-mid/sfi.c b/arch/x86/platform/intel-mid/sfi.c
index b8f7f193f383..30bd5714a3d4 100644
--- a/arch/x86/platform/intel-mid/sfi.c
+++ b/arch/x86/platform/intel-mid/sfi.c
@@ -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