diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index f95cb5636d191d8b447df4a09e29c16571f1e3e9..576b8066089e2deb89a89124c3c80b6517cfed85 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c @@ -1574,18 +1574,10 @@ int fsl_rio_setup(struct platform_device *dev) */ static int __devinit fsl_of_rio_rpn_probe(struct platform_device *dev) { - int rc; printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n", dev->dev.of_node->full_name); - rc = fsl_rio_setup(dev); - if (rc) - goto out; - - /* Enumerate all registered ports */ - rc = rio_init_mports(); -out: - return rc; + return fsl_rio_setup(dev); }; static const struct of_device_id fsl_of_rio_rpn_ids[] = { diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c index 678e5777da8168aac5ba6944746f978415382358..26afbaae23f0d1fb7acbf65c030d92fcfd2ebda0 100644 --- a/drivers/net/rionet.c +++ b/drivers/net/rionet.c @@ -571,5 +571,5 @@ static void __exit rionet_exit(void) rio_unregister_driver(&rionet_driver); } -module_init(rionet_init); +late_initcall(rionet_init); module_exit(rionet_exit); diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c index d520dbaede80af02a177510b6c54c2918c759012..f861b728f80eea2f4efaec610c62b8d7dc04a6ce 100644 --- a/drivers/rapidio/rio.c +++ b/drivers/rapidio/rio.c @@ -1134,8 +1134,6 @@ static int __devinit rio_init(void) return 0; } -device_initcall(rio_init); - int __devinit rio_init_mports(void) { int rc = 0; @@ -1158,10 +1156,14 @@ int __devinit rio_init_mports(void) rio_disc_mport(port); } + rio_init(); + out: return rc; } +device_initcall_sync(rio_init_mports); + void rio_register_mport(struct rio_mport *port) { list_add_tail(&port->node, &rio_mports); diff --git a/include/linux/rio.h b/include/linux/rio.h index efed116efe9cc31387ec9b12cbb34059bacaadb5..b6bcb1632749166d3b3eeac6bed52328e1668201 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h @@ -395,7 +395,6 @@ union rio_pw_msg { }; /* Architecture and hardware-specific functions */ -extern int rio_init_mports(void); extern void rio_register_mport(struct rio_mport *); extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); extern void rio_close_inb_mbox(struct rio_mport *, int);