diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2020-03-27 00:10:00 +0300 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2020-03-29 00:47:59 +0300 |
commit | fae6802daf46fa4665fe964eb943f026bcf32fbf (patch) | |
tree | 96bba74af269211349bafa4a7c075f4c08d61742 | |
parent | 0bf659504912718312547d4ebf14a4e678c4f060 (diff) | |
download | linux-fae6802daf46fa4665fe964eb943f026bcf32fbf.tar.xz |
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: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200326211005.13301-3-wsa+renesas@sang-engineering.com
-rw-r--r-- | drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c b/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c index 9e8224456ea2..71574063c63e 100644 --- a/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c +++ b/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c @@ -747,11 +747,11 @@ static int cmi_lcd_hack_create_device(void) return -EINVAL; } - client = i2c_new_device(adapter, &info); - if (!client) { - pr_err("%s: i2c_new_device() failed\n", __func__); + client = i2c_new_client_device(adapter, &info); + if (IS_ERR(client)) { + pr_err("%s: creating I2C device failed\n", __func__); i2c_put_adapter(adapter); - return -EINVAL; + return PTR_ERR(client); } return 0; |