From: Wolfram Sang Date: Thu, 26 Mar 2020 21:09:43 +0000 (+0100) Subject: media: marvell-ccic: convert to use i2c_new_client_device() X-Git-Tag: v5.15~3350^2~571 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03c87596b71a63cd62afe738666017857ead5fdb;p=platform%2Fkernel%2Flinux-starfive.git media: marvell-ccic: 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/marvell-ccic/cafe-driver.c b/drivers/media/platform/marvell-ccic/cafe-driver.c index 37fdcc5..9a09a10 100644 --- a/drivers/media/platform/marvell-ccic/cafe-driver.c +++ b/drivers/media/platform/marvell-ccic/cafe-driver.c @@ -556,7 +556,7 @@ static int cafe_pci_probe(struct pci_dev *pdev, clkdev_create(mcam->mclk, "xclk", "%d-%04x", i2c_adapter_id(cam->i2c_adapter), ov7670_info.addr); - if (i2c_new_device(cam->i2c_adapter, &ov7670_info)) { + if (!IS_ERR(i2c_new_client_device(cam->i2c_adapter, &ov7670_info))) { cam->registered = 1; return 0; }