From: Wolfram Sang Date: Thu, 26 Mar 2020 21:10:02 +0000 (+0100) Subject: drm/i2c/tda998x: convert to use i2c_new_client_device() X-Git-Tag: v5.15~303^2~28^2~3098 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf2993c19b00af9b68c10ff1089e1ea90dc0e19f;p=platform%2Fkernel%2Flinux-starfive.git 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 Acked-by: Alex Deucher Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200326211005.13301-5-wsa+renesas@sang-engineering.com --- diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index c333220..d9a548d 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -1949,9 +1949,9 @@ static int tda998x_create(struct device *dev) cec_info.platform_data = &priv->cec_glue; cec_info.irq = client->irq; - priv->cec = i2c_new_device(client->adapter, &cec_info); - if (!priv->cec) { - ret = -ENODEV; + priv->cec = i2c_new_client_device(client->adapter, &cec_info); + if (IS_ERR(priv->cec)) { + ret = PTR_ERR(priv->cec); goto fail; }