Index: drivers/spi/mpc52xx_psc_spi.c =================================================================== --- drivers/spi/mpc52xx_psc_spi.c (revision 692) +++ drivers/spi/mpc52xx_psc_spi.c (working copy) @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -370,9 +371,10 @@ } /* 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, +static int __init mpc52xx_psc_spi_do_probe(struct of_device *op, u32 regaddr, u32 size, unsigned int irq, s16 bus_num) { + struct device * dev = &op->dev; struct fsl_spi_platform_data *pdata = dev->platform_data; struct mpc52xx_psc_spi *mps; struct spi_master *master; @@ -439,6 +441,8 @@ if (ret < 0) goto unreg_master; + of_register_spi_devices(master, op->node); + return ret; unreg_master: @@ -495,7 +499,7 @@ id = *psc_nump + 1; } - return mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64, + return mpc52xx_psc_spi_do_probe(op, (u32)regaddr64, (u32)size64, irq_of_parse_and_map(op->node, 0), id); }