Skip to content

Commit

Permalink
net: fix fsl_pq_mdio driver to use module_init()
Browse files Browse the repository at this point in the history
Modules are not supposed to use any of the *_initcall*() hooks as
the entry point.  fsl_pq_mdio.c was using subsys_initcall_sync()
instead of module_init() to guarantee that the MDIO bus was initialized
before the Ethernet driver goes looking for the phy.  However, the recent
OF helpers rework happens to also make sure PHY connection is deferred to
.open time, so using an initcall is no longer necessary.

This patch replaces the initcall with a more traditional an accepted
module_init() call.

Tested on Freescale MPC8349emitxgp eval board.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Grant Likely authored and David S. Miller committed Apr 27, 2009
1 parent 9274498 commit 434e7b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/fsl_pq_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,10 @@ int __init fsl_pq_mdio_init(void)
{
return of_register_platform_driver(&fsl_pq_mdio_driver);
}
module_init(fsl_pq_mdio_init);

void fsl_pq_mdio_exit(void)
{
of_unregister_platform_driver(&fsl_pq_mdio_driver);
}
subsys_initcall_sync(fsl_pq_mdio_init);
module_exit(fsl_pq_mdio_exit);

0 comments on commit 434e7b0

Please sign in to comment.