Skip to content

Commit f04a5ba

Browse files
Wolfram Sangwsakernel
authored andcommitted
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 <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent bb7d93f commit f04a5ba

File tree

1 file changed

+2
-2
lines changed
  • arch/x86/platform/intel-mid

1 file changed

+2
-2
lines changed

arch/x86/platform/intel-mid/sfi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ void intel_scu_devices_create(void)
287287

288288
adapter = i2c_get_adapter(i2c_bus[i]);
289289
if (adapter) {
290-
client = i2c_new_device(adapter, i2c_devs[i]);
291-
if (!client)
290+
client = i2c_new_client_device(adapter, i2c_devs[i]);
291+
if (IS_ERR(client))
292292
pr_err("can't create i2c device %s\n",
293293
i2c_devs[i]->type);
294294
} else

0 commit comments

Comments
 (0)