summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-cht-wc.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2020-01-07 20:47:35 +0300
committerWolfram Sang <wsa@the-dreams.de>2020-01-15 22:39:07 +0300
commit6b5794abdcddfd3d1584aff1a13f440d5999ac84 (patch)
treeddd7503473ec328ca4c3756847c4196d1baed748 /drivers/i2c/busses/i2c-cht-wc.c
parent49945ef0f90b5becef67db68338e8ce34ef70975 (diff)
downloadlinux-6b5794abdcddfd3d1584aff1a13f440d5999ac84.tar.xz
i2c: cht-wc: 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> Tested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-cht-wc.c')
-rw-r--r--drivers/i2c/busses/i2c-cht-wc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c
index b8fde61bb5d8..35e55feda763 100644
--- a/drivers/i2c/busses/i2c-cht-wc.c
+++ b/drivers/i2c/busses/i2c-cht-wc.c
@@ -388,9 +388,9 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev)
*/
if (acpi_dev_present("INT33FE", NULL, -1)) {
board_info.irq = adap->client_irq;
- adap->client = i2c_new_device(&adap->adapter, &board_info);
- if (!adap->client) {
- ret = -ENOMEM;
+ adap->client = i2c_new_client_device(&adap->adapter, &board_info);
+ if (IS_ERR(adap->client)) {
+ ret = PTR_ERR(adap->client);
goto del_adapter;
}
}