Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wolfram Sang and committed by
Wolfram Sang
f04a5ba1 bb7d93ff

+2 -2
+2 -2
arch/x86/platform/intel-mid/sfi.c
··· 287 287 288 288 adapter = i2c_get_adapter(i2c_bus[i]); 289 289 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)) 292 292 pr_err("can't create i2c device %s\n", 293 293 i2c_devs[i]->type); 294 294 } else