linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi/mpc5121: register spi child devices of spi node
@ 2010-07-26 22:59 Anatolij Gustschin
       [not found] ` <1280185178-5002-1-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Anatolij Gustschin @ 2010-07-26 22:59 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: David Brownell, Anatolij Gustschin

Signed-off-by: Anatolij Gustschin <agust-ynQEQJNshbs@public.gmane.org>
---
 drivers/spi/mpc512x_psc_spi.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/mpc512x_psc_spi.c b/drivers/spi/mpc512x_psc_spi.c
index c8d69fc..39e5faf 100644
--- a/drivers/spi/mpc512x_psc_spi.c
+++ b/drivers/spi/mpc512x_psc_spi.c
@@ -27,6 +27,7 @@
 #include <linux/clk.h>
 #include <linux/spi/spi.h>
 #include <linux/fsl_devices.h>
+#include <linux/of_spi.h>
 #include <asm/mpc52xx_psc.h>
 
 struct mpc512x_psc_spi {
@@ -511,6 +512,7 @@ static int __devinit mpc512x_psc_spi_of_probe(struct of_device *op,
 	const u32 *regaddr_p;
 	u64 regaddr64, size64;
 	s16 id = -1;
+	int ret;
 
 	regaddr_p = of_get_address(op->dev.of_node, 0, &size64, NULL);
 	if (!regaddr_p) {
@@ -533,8 +535,14 @@ static int __devinit mpc512x_psc_spi_of_probe(struct of_device *op,
 		id = *psc_nump;
 	}
 
-	return mpc512x_psc_spi_do_probe(&op->dev, (u32) regaddr64, (u32) size64,
+	ret = mpc512x_psc_spi_do_probe(&op->dev, (u32) regaddr64, (u32) size64,
 				irq_of_parse_and_map(op->dev.of_node, 0), id);
+
+	if (!ret)
+		of_register_spi_devices(dev_get_drvdata(&op->dev),
+					op->dev.of_node);
+
+	return ret;
 }
 
 static int __devexit mpc512x_psc_spi_of_remove(struct of_device *op)
-- 
1.7.0.4


------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/

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

end of thread, other threads:[~2010-07-27 20:35 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26 22:59 [PATCH] spi/mpc5121: register spi child devices of spi node Anatolij Gustschin
     [not found] ` <1280185178-5002-1-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
2010-07-27  6:17   ` Baruch Siach
     [not found]     ` <20100727061744.GB22765-X57xyCW21FZ5l4KbKkTfamZHpeb/A1Y/@public.gmane.org>
2010-07-27  6:21       ` Grant Likely
2010-07-27  6:28       ` David Brownell
     [not found]         ` <298403.16600.qm-g47maUHHHF9+W+z1sZEpBPu2YVrzzGjVVpNB7YpNyf8@public.gmane.org>
2010-07-27  6:37           ` Grant Likely
     [not found]             ` <AANLkTik9GYDGi3jnMdPdyOa6sFv4bo_+4b-RWMq7nW6x-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-27  6:47               ` David Brownell
2010-07-27 13:39               ` [PATCH] of/spi: call of_register_spi_devices() from spi core code Anatolij Gustschin
     [not found]                 ` <1280237967-2460-1-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
2010-07-27 17:40                   ` Grant Likely
     [not found]                     ` <AANLkTimG+QLksWVbQ63F=Bc1h-9946J1RO0qSavBAegO-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-27 20:35                       ` [PATCH v2] " Anatolij Gustschin
2010-07-27  7:14           ` [PATCH] spi/mpc5121: register spi child devices of spi node Feng Tang
2010-07-27  7:00             ` Grant Likely
     [not found]               ` <AANLkTikZ4MMqmM3jn8yh49kh5+qOh2nmaYDVBOYhbo-K-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-27  7:27                 ` Feng Tang
2010-07-27  7:18                   ` David Brownell
2010-07-27  7:07             ` David Brownell
     [not found]               ` <793633.1143.qm-4JhmkcZgSkk/JfqJOfUXs/u2YVrzzGjVVpNB7YpNyf8@public.gmane.org>
2010-07-27  7:33                 ` Feng Tang
2010-07-27  7:27                   ` David Brownell
     [not found]                     ` <200077.42951.qm-g47maUHHHF8P4eY3Ra60wvu2YVrzzGjVVpNB7YpNyf8@public.gmane.org>
2010-07-27  7:52                       ` Feng Tang
2010-07-27  7:44                         ` David Brownell
     [not found]                           ` <395617.66036.qm-g47maUHHHF/6X00i2u5GFvu2YVrzzGjVVpNB7YpNyf8@public.gmane.org>
2010-07-27  8:07                             ` Feng Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).