Skip to content

Commit ce94651

Browse files
glevandjonmason
authored andcommitted
ntb_netdev: Fix module_init problem
With both the ntb_transport_init and the ntb_netdev_init_module routines in the module_init init group, the ntb_netdev_init_module routine can be called before the ntb_transport_init routine that it depends on is called. To assure the proper initialization order put ntb_netdev_init_module in the late_initcall group. Fixes runtime errors where the ntb_netdev_init_module call fails with ENODEV. Signed-off-by: Geoff Levand <geoff@infradead.org> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
1 parent d353fb4 commit ce94651

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ntb_netdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ static int __init ntb_netdev_init_module(void)
493493

494494
return 0;
495495
}
496-
module_init(ntb_netdev_init_module);
496+
late_initcall(ntb_netdev_init_module);
497497

498498
static void __exit ntb_netdev_exit_module(void)
499499
{

0 commit comments

Comments
 (0)