From 766becee70f62b50e805a832d9a39d86a1c3c4fa Mon Sep 17 00:00:00 2001 From: Sergio Paracuellos Date: Fri, 15 Feb 2019 07:18:38 +0100 Subject: [PATCH] staging: mt7621-pci-phy: use 'module_init' instead of 'arch_initcall' Init driver as 'arch_initcall()' does not work. It causes phy_create() to be called before the phy module is initialized, so 'phy_class' is NULL, the new phy isn't placed in the right class, and it cannot be found. Change to 'module_init()' which works properly in this case. Fixes: 00981d31d6df: staging: mt7621-pci-phy: add new driver for phy part of mt7621-pci Reported-by: NeilBrown Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman --- drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c b/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c index 3d16716cfebc..d3ca2f019112 100644 --- a/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c +++ b/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c @@ -380,7 +380,7 @@ static int __init mt7621_pci_phy_drv_init(void) return platform_driver_register(&mt7621_pci_phy_driver); } -arch_initcall(mt7621_pci_phy_drv_init); +module_init(mt7621_pci_phy_drv_init); MODULE_AUTHOR("Sergio Paracuellos "); MODULE_DESCRIPTION("MediaTek MT7621 PCIe PHY driver"); -- 2.11.0