diff mbox series

media: i2c: Add driver for RDACM21 camera module (squash!)

Message ID 20200214090120.31507-1-kieran.bingham+renesas@ideasonboard.com (mailing list archive)
State Accepted
Delegated to: Kieran Bingham
Headers show
Series media: i2c: Add driver for RDACM21 camera module (squash!) | expand

Commit Message

Kieran Bingham Feb. 14, 2020, 9:01 a.m. UTC
Rebasing the GMSL work to the latest media/master branch requires fixing up the
RDACM21 to support the updated i2c apis.

 - Use new i2c_new_dummy_device API
---
 drivers/media/i2c/rdacm21.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c
index d7490371e5c7..229f23432b41 100644
--- a/drivers/media/i2c/rdacm21.c
+++ b/drivers/media/i2c/rdacm21.c
@@ -291,10 +291,9 @@  static int rdacm21_probe(struct i2c_client *client)
 		return -EINVAL;
 	}
 
-	dev->isp = i2c_new_dummy(client->adapter, OV490_I2C_ADDRESS);
-	if (!dev->isp) {
-		return -ENXIO;
-	}
+	dev->isp = i2c_new_dummy_device(client->adapter, OV490_I2C_ADDRESS);
+	if (IS_ERR(dev->isp))
+		return PTR_ERR(dev->isp);
 
 	ret = rdacm21_initialize(dev);
 	if (ret < 0)