i2c: ocores: convert to use i2c_new_client_device()
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 7 Jan 2020 17:47:38 +0000 (18:47 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 15 Jan 2020 19:39:26 +0000 (20:39 +0100)
Move away from the deprecated API and return the shiny new ERRPTR where
useful.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-ocores.c

index ca8b3ecfa93d1346dab8759246c9d41c7448252a..f5fc75b65a194f18e65d734cf0833449492d9c28 100644 (file)
@@ -731,7 +731,7 @@ static int ocores_i2c_probe(struct platform_device *pdev)
        /* add in known devices to the bus */
        if (pdata) {
                for (i = 0; i < pdata->num_devices; i++)
-                       i2c_new_device(&i2c->adap, pdata->devices + i);
+                       i2c_new_client_device(&i2c->adap, pdata->devices + i);
        }
 
        return 0;