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

drm/i2c/tda998x: 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-5-wsa+renesas@sang-engineering.com

authored by

Wolfram Sang and committed by
Sam Ravnborg
bf2993c1 d1fe2e78

+3 -3
+3 -3
drivers/gpu/drm/i2c/tda998x_drv.c
··· 1949 1949 cec_info.platform_data = &priv->cec_glue; 1950 1950 cec_info.irq = client->irq; 1951 1951 1952 - priv->cec = i2c_new_device(client->adapter, &cec_info); 1953 - if (!priv->cec) { 1954 - ret = -ENODEV; 1952 + priv->cec = i2c_new_client_device(client->adapter, &cec_info); 1953 + if (IS_ERR(priv->cec)) { 1954 + ret = PTR_ERR(priv->cec); 1955 1955 goto fail; 1956 1956 } 1957 1957