public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c-ocores: register devices on child nodes
@ 2011-02-10  2:51 Thomas Chou
  2011-02-16  4:35 ` Grant Likely
  2011-02-23  0:12 ` Ben Dooks
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Chou @ 2011-02-10  2:51 UTC (permalink / raw)
  To: Grant Likely, Ben Dooks
  Cc: linux-kernel, nios2-dev, devicetree-discuss, linux-i2c,
	Thomas Chou

This patch registers devices on the devicetree child nodes to the bus.
Also removes one trailing whitespace.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 drivers/i2c/busses/i2c-ocores.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index ef3bcb1..c63838f 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -18,7 +18,7 @@
  * - interrupts      : interrupt number
  * - regstep         : size of device registers in bytes
  * - clock-frequency : frequency of bus clock in Hz
- * 
+ *
  * Example:
  *
  *  i2c0: ocores@a0000000 {
@@ -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;
@@ -347,6 +348,9 @@ static int __devinit ocores_i2c_probe(struct platform_device *pdev)
 			i2c_new_device(&i2c->adap, pdata->devices + i);
 	}
 
+	/* Now register all the child nodes */
+	of_i2c_register_devices(&i2c->adap);
+
 	return 0;
 }
 
-- 
1.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-23  1:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-10  2:51 [PATCH] i2c-ocores: register devices on child nodes Thomas Chou
2011-02-16  4:35 ` Grant Likely
2011-02-20 23:28   ` Ben Dooks
2011-02-21  3:40     ` Grant Likely
2011-02-23  0:12 ` Ben Dooks
2011-02-23  0:31   ` Thomas Chou
2011-02-23  1:07     ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox