diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2020-01-07 18:47:37 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2020-01-15 20:39:21 +0100 |
commit | 7fd0379f8696378128c73c29f7b69a9d3ee18fdc (patch) | |
tree | d53e8239ff7ac10c7c4c78f2e6140e6fa5cf61d1 /drivers/i2c | |
parent | 41d06630b494b7ff27c07f4475571996fba6bb6d (diff) |
i2c: nvidia-gpu: 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>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-nvidia-gpu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c index 5a1235fd86bb..62e18b4db0ed 100644 --- a/drivers/i2c/busses/i2c-nvidia-gpu.c +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c @@ -280,9 +280,9 @@ static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq) i2cd->gpu_ccgx_ucsi->addr = 0x8; i2cd->gpu_ccgx_ucsi->irq = irq; i2cd->gpu_ccgx_ucsi->properties = ccgx_props; - i2cd->ccgx_client = i2c_new_device(&i2cd->adapter, i2cd->gpu_ccgx_ucsi); - if (!i2cd->ccgx_client) - return -ENODEV; + i2cd->ccgx_client = i2c_new_client_device(&i2cd->adapter, i2cd->gpu_ccgx_ucsi); + if (IS_ERR(i2cd->ccgx_client)) + return PTR_ERR(i2cd->ccgx_client); return 0; } |