• Javier Martinez Canillas's avatar
    net: hisilicon: Fix hns_mdio module autoload for OF registration · af40097e
    Javier Martinez Canillas authored
    If the driver is built as a module, autoload won't work because the module
    alias information is not filled. So user-space can't match the registered
    device with the corresponding module.
    
    Export the module alias information using the MODULE_DEVICE_TABLE() macro.
    
    Before this patch:
    
    $ modinfo drivers/net/ethernet/hisilicon//hns_mdio.ko | grep alias
    alias:          platform:Hi-HNS_MDIO
    alias:          acpi*:HISI0141:*
    
    After this patch:
    
    $ modinfo drivers/net/ethernet/hisilicon//hns_mdio.ko | grep alias
    alias:          platform:Hi-HNS_MDIO
    alias:          of:N*T*Chisilicon,hns-mdioC*
    alias:          of:N*T*Chisilicon,hns-mdio
    alias:          of:N*T*Chisilicon,mdioC*
    alias:          of:N*T*Chisilicon,mdio
    alias:          acpi*:HISI0141:*
    Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    af40097e
hns_mdio.c 14.4 KB