Index: drivers/spi/mpc52xx_psc_spi.c =================================================================== --- drivers/spi/mpc52xx_psc_spi.c (revision 548) +++ drivers/spi/mpc52xx_psc_spi.c (working copy) @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -371,7 +372,7 @@ /* bus_num is used only for the case dev->platform_data == NULL */ static int __init mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr, - u32 size, unsigned int irq, s16 bus_num) + u32 size, unsigned int irq, s16 bus_num, struct spi_master ** pmaster) { struct fsl_spi_platform_data *pdata = dev->platform_data; struct mpc52xx_psc_spi *mps; @@ -439,6 +440,10 @@ if (ret < 0) goto unreg_master; + dev_info(dev, "Activated\n"); + + *pmaster = master; + return ret; unreg_master: @@ -474,6 +479,8 @@ const u32 *regaddr_p; u64 regaddr64, size64; s16 id = -1; + int res; + struct spi_master * master = NULL;; regaddr_p = of_get_address(op->node, 0, &size64, NULL); if (!regaddr_p) { @@ -495,8 +502,16 @@ id = *psc_nump + 1; } - return mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64, - irq_of_parse_and_map(op->node, 0), id); + res = mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64, + irq_of_parse_and_map(op->node, 0), id, &master); + + if( master != NULL ) + { + /* Add any subnodes on the SPI bus */ + of_register_spi_devices( master, op->node); + } + + return res; } static int __exit mpc52xx_psc_spi_of_remove(struct of_device *op)