From: Ganesan Ramalingam Date: Tue, 8 May 2012 13:25:28 +0000 (+0530) Subject: i2c: ocores: register OF i2c devices X-Git-Tag: firefly_0821_release~3680^2~2744^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a5063f16e2963c5d5b54692fb2da2e327162da78;p=firefly-linux-kernel-4.4.55.git i2c: ocores: register OF i2c devices Call of_i2c_register_devices() in probe function to register i2c devices specified in the device tree or OF. Signed-off-by: Ganesan Ramalingam Signed-off-by: Jayachandran C [wsa: add proper braces] Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c index 18068dee48f1..75194c579b6d 100644 --- a/drivers/i2c/busses/i2c-ocores.c +++ b/drivers/i2c/busses/i2c-ocores.c @@ -55,6 +55,7 @@ #include #include #include +#include struct ocores_i2c { void __iomem *base; @@ -343,6 +344,8 @@ static int __devinit ocores_i2c_probe(struct platform_device *pdev) if (pdata) { for (i = 0; i < pdata->num_devices; i++) i2c_new_device(&i2c->adap, pdata->devices + i); + } else { + of_i2c_register_devices(&i2c->adap); } return 0;