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

mfd: htc-i2cpld: 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>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Wolfram Sang and committed by
Lee Jones
8bc401f3 e8a6f4ac

+3 -3
+3 -3
drivers/mfd/htc-i2cpld.c
··· 355 355 info.platform_data = chip; 356 356 357 357 /* Add the I2C device. This calls the probe() function. */ 358 - client = i2c_new_device(adapter, &info); 359 - if (!client) { 358 + client = i2c_new_client_device(adapter, &info); 359 + if (IS_ERR(client)) { 360 360 /* I2C device registration failed, contineu with the next */ 361 361 dev_warn(dev, "Unable to add I2C device for 0x%x\n", 362 362 plat_chip_data->addr); 363 - return -ENODEV; 363 + return PTR_ERR(client); 364 364 } 365 365 366 366 i2c_set_clientdata(client, chip);