Commit 6b5794ab authored by Wolfram Sang's avatar Wolfram Sang Committed by Wolfram Sang

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 49945ef0
...@@ -388,9 +388,9 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev) ...@@ -388,9 +388,9 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev)
*/ */
if (acpi_dev_present("INT33FE", NULL, -1)) { if (acpi_dev_present("INT33FE", NULL, -1)) {
board_info.irq = adap->client_irq; board_info.irq = adap->client_irq;
adap->client = i2c_new_device(&adap->adapter, &board_info); adap->client = i2c_new_client_device(&adap->adapter, &board_info);
if (!adap->client) { if (IS_ERR(adap->client)) {
ret = -ENOMEM; ret = PTR_ERR(adap->client);
goto del_adapter; goto del_adapter;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment