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

mfd: bcm590xx: 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
98f0c05f f5d5d193

+3 -3
+3 -3
drivers/mfd/bcm590xx.c
··· 61 61 } 62 62 63 63 /* Secondary I2C slave address is the base address with A(2) asserted */ 64 - bcm590xx->i2c_sec = i2c_new_dummy(i2c_pri->adapter, 64 + bcm590xx->i2c_sec = i2c_new_dummy_device(i2c_pri->adapter, 65 65 i2c_pri->addr | BIT(2)); 66 - if (!bcm590xx->i2c_sec) { 66 + if (IS_ERR(bcm590xx->i2c_sec)) { 67 67 dev_err(&i2c_pri->dev, "failed to add secondary I2C device\n"); 68 - return -ENODEV; 68 + return PTR_ERR(bcm590xx->i2c_sec); 69 69 } 70 70 i2c_set_clientdata(bcm590xx->i2c_sec, bcm590xx); 71 71