From: Wolfram Sang Date: Thu, 26 Mar 2020 21:10:03 +0000 (+0100) Subject: drm/nouveau/therm: convert to use i2c_new_client_device() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3f9becf950aa9ceb949f6df90fd3d027d30fe69c;p=linux.git drm/nouveau/therm: 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-6-wsa+renesas@sang-engineering.com --- diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/ic.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/ic.c index 03b355dabab3d..abf3eda683f0c 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/ic.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/ic.c @@ -36,8 +36,8 @@ probe_monitoring_device(struct nvkm_i2c_bus *bus, request_module("%s%s", I2C_MODULE_PREFIX, info->type); - client = i2c_new_device(&bus->i2c, info); - if (!client) + client = i2c_new_client_device(&bus->i2c, info); + if (IS_ERR(client)) return false; if (!client->dev.driver ||