diff mbox series

media: i2c: Add RDACM20 driver (squash!)

Message ID 20200214090120.31507-2-kieran.bingham+renesas@ideasonboard.com (mailing list archive)
State Accepted
Delegated to: Kieran Bingham
Headers show
Series media: i2c: Add RDACM20 driver (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
RDACM20 to support the updated i2c apis.

 - Use new i2c_new_dummy_device API

---
 drivers/media/i2c/rdacm20.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/media/i2c/rdacm20.c b/drivers/media/i2c/rdacm20.c
index 97026ee91898..0cd467378922 100644
--- a/drivers/media/i2c/rdacm20.c
+++ b/drivers/media/i2c/rdacm20.c
@@ -286,9 +286,10 @@  static int rdacm20_probe(struct i2c_client *client)
 	dev->serializer->client = client;
 
 	/* Create the dummy I2C client for the sensor. */
-	dev->sensor = i2c_new_dummy(client->adapter, OV10635_I2C_ADDRESS);
-	if (!dev->sensor) {
-		ret = -ENXIO;
+	dev->sensor = i2c_new_dummy_device(client->adapter,
+					   OV10635_I2C_ADDRESS);
+	if (IS_ERR(dev->sensor)) {
+		ret = PTR_ERR(dev->sensor);
 		goto error;
 	}