Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Wolfram Sang and committed by
Sam Ravnborg
fae6802d 0bf65950

+4 -4
+4 -4
drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c
··· 747 747 return -EINVAL; 748 748 } 749 749 750 - client = i2c_new_device(adapter, &info); 751 - if (!client) { 752 - pr_err("%s: i2c_new_device() failed\n", __func__); 750 + client = i2c_new_client_device(adapter, &info); 751 + if (IS_ERR(client)) { 752 + pr_err("%s: creating I2C device failed\n", __func__); 753 753 i2c_put_adapter(adapter); 754 - return -EINVAL; 754 + return PTR_ERR(client); 755 755 } 756 756 757 757 return 0;