summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2020-01-07 18:47:38 +0100
committerWolfram Sang <wsa@the-dreams.de>2020-01-15 20:39:26 +0100
commit7de69dbf0d7f2a6abc02dc190fc260c0d11626b4 (patch)
tree840fbcb1fb10ab21b504f88c227910b7c480ce75
parent7fd0379f8696378128c73c29f7b69a9d3ee18fdc (diff)
downloadlinux-stable-7de69dbf0d7f2a6abc02dc190fc260c0d11626b4.tar.gz
linux-stable-7de69dbf0d7f2a6abc02dc190fc260c0d11626b4.tar.bz2
linux-stable-7de69dbf0d7f2a6abc02dc190fc260c0d11626b4.zip
i2c: ocores: 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> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r--drivers/i2c/busses/i2c-ocores.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index ca8b3ecfa93d..f5fc75b65a19 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -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;