mfd: 88pm800: 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>
This commit is contained in:
parent
aee36174b2
commit
8321589735
@ -425,10 +425,10 @@ static int pm800_pages_init(struct pm80x_chip *chip)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
/* PM800 block power page */
|
/* PM800 block power page */
|
||||||
subchip->power_page = i2c_new_dummy(client->adapter,
|
subchip->power_page = i2c_new_dummy_device(client->adapter,
|
||||||
subchip->power_page_addr);
|
subchip->power_page_addr);
|
||||||
if (subchip->power_page == NULL) {
|
if (IS_ERR(subchip->power_page)) {
|
||||||
ret = -ENODEV;
|
ret = PTR_ERR(subchip->power_page);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -444,10 +444,10 @@ static int pm800_pages_init(struct pm80x_chip *chip)
|
|||||||
i2c_set_clientdata(subchip->power_page, chip);
|
i2c_set_clientdata(subchip->power_page, chip);
|
||||||
|
|
||||||
/* PM800 block GPADC */
|
/* PM800 block GPADC */
|
||||||
subchip->gpadc_page = i2c_new_dummy(client->adapter,
|
subchip->gpadc_page = i2c_new_dummy_device(client->adapter,
|
||||||
subchip->gpadc_page_addr);
|
subchip->gpadc_page_addr);
|
||||||
if (subchip->gpadc_page == NULL) {
|
if (IS_ERR(subchip->gpadc_page)) {
|
||||||
ret = -ENODEV;
|
ret = PTR_ERR(subchip->gpadc_page);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user