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

mfd: da9150-core: Convert to i2c_new_dummy_device

Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an
ERRPTR which we use in error handling.

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
e310ee86 98f0c05f

+3 -3
+3 -3
drivers/mfd/da9150-core.c
··· 420 420 qif_addr = da9150_reg_read(da9150, DA9150_CORE2WIRE_CTRL_A); 421 421 qif_addr = (qif_addr & DA9150_CORE_BASE_ADDR_MASK) >> 1; 422 422 qif_addr |= DA9150_QIF_I2C_ADDR_LSB; 423 - da9150->core_qif = i2c_new_dummy(client->adapter, qif_addr); 424 - if (!da9150->core_qif) { 423 + da9150->core_qif = i2c_new_dummy_device(client->adapter, qif_addr); 424 + if (IS_ERR(da9150->core_qif)) { 425 425 dev_err(da9150->dev, "Failed to attach QIF client\n"); 426 - return -ENODEV; 426 + return PTR_ERR(da9150->core_qif); 427 427 } 428 428 429 429 i2c_set_clientdata(da9150->core_qif, da9150);