summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-08-15 09:45:16 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-17 09:36:35 +0200
commitc574a0d1f1ef61889c9a5e378bcb814e218665e8 (patch)
treef1914e902df7519a33de053a3443eb7906fbbc0a
parentc41360cd207f91a5b19732c97e568846c53675f0 (diff)
downloadbarebox-c574a0d1f1ef61889c9a5e378bcb814e218665e8.tar.gz
barebox-c574a0d1f1ef61889c9a5e378bcb814e218665e8.tar.xz
spi: make the spi devices children of the parent bus
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/spi/spi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 80586947b5..b561f9da2d 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -79,6 +79,7 @@ struct spi_device *spi_new_device(struct spi_master *master,
proxy->dev.platform_data = chip->platform_data;
strcpy(proxy->dev.name, chip->name);
proxy->dev.type_data = proxy;
+ dev_add_child(master->dev, &proxy->dev);
status = register_device(&proxy->dev);
/* drivers may modify this initial i/o setup */