Commit fae6802d authored by Wolfram Sang's avatar Wolfram Sang Committed by Sam Ravnborg

drm/gma500: 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>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200326211005.13301-3-wsa+renesas@sang-engineering.com
parent 0bf65950
...@@ -747,11 +747,11 @@ static int cmi_lcd_hack_create_device(void) ...@@ -747,11 +747,11 @@ static int cmi_lcd_hack_create_device(void)
return -EINVAL; return -EINVAL;
} }
client = i2c_new_device(adapter, &info); client = i2c_new_client_device(adapter, &info);
if (!client) { if (IS_ERR(client)) {
pr_err("%s: i2c_new_device() failed\n", __func__); pr_err("%s: creating I2C device failed\n", __func__);
i2c_put_adapter(adapter); i2c_put_adapter(adapter);
return -EINVAL; return PTR_ERR(client);
} }
return 0; return 0;
......
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