]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
spi/pxa2xx: pass of_node to spi device and set a parent device
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 8 Oct 2010 16:11:19 +0000 (18:11 +0200)
committerSebastian Andrzej Siewior <bigeasy@linutronix.de>
Thu, 2 Dec 2010 16:55:13 +0000 (17:55 +0100)
the of_node will auto-publish devices which are added to the device
tree.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
drivers/spi/pxa2xx_spi.c

index 9ca6454cfadce305b17dc519a08f3da21b2e3bb2..95928833855b0e922bf5ee23ea6ff36241e8b2bb 100644 (file)
@@ -1556,6 +1556,10 @@ static int __devinit pxa2xx_spi_probe(struct platform_device *pdev)
        drv_data->pdev = pdev;
        drv_data->ssp = ssp;
 
+       master->dev.parent = &pdev->dev;
+#ifdef CONFIG_OF
+       master->dev.of_node = pdev->dev.of_node;
+#endif
        /* the spi->mode bits understood by this driver: */
        master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;