On Tue, May 08, 2012 at 06:55:28PM +0530, Jayachandran C wrote: > From: Ganesan Ramalingam <ganesanr@xxxxxxxxxxxx> > > Call of_i2c_register_devices() in probe function to register i2c devices > specified in the device tree or OF. > > Signed-off-by: Ganesan Ramalingam <ganesanr@xxxxxxxxxxxx> > Signed-off-by: Jayachandran C <jayachandranc@xxxxxxxxxxxxxxxxx> Applied to next with a minor fixup. More important: If you are happily using this driver without issues, please consider removing EXPERIMENTAL for this driver from Kconfig. > --- > drivers/i2c/busses/i2c-ocores.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c > index 18068de..ebd2700 100644 > --- a/drivers/i2c/busses/i2c-ocores.c > +++ b/drivers/i2c/busses/i2c-ocores.c > @@ -55,6 +55,7 @@ > #include <linux/i2c-ocores.h> > #include <linux/slab.h> > #include <linux/io.h> > +#include <linux/of_i2c.h> > > struct ocores_i2c { > void __iomem *base; > @@ -343,7 +344,9 @@ 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); > + This empty line was too much; also the else branch could have had braces. Thanks, Wolfram -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ |
Attachment:
signature.asc
Description: Digital signature