• Javier Martinez Canillas's avatar
    power: reset: at91-poweroff: Fix module autoload · c9ba9b77
    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/power/reset/at91-poweroff.ko | grep alias
    $
    
    After this patch:
    
    $ modinfo drivers/power/reset/at91-poweroff.ko | grep alias
    alias:          of:N*T*Catmel,at91sam9x5-shdwcC*
    alias:          of:N*T*Catmel,at91sam9x5-shdwc
    alias:          of:N*T*Catmel,at91sam9rl-shdwcC*
    alias:          of:N*T*Catmel,at91sam9rl-shdwc
    alias:          of:N*T*Catmel,at91sam9260-shdwcC*
    alias:          of:N*T*Catmel,at91sam9260-shdwc
    Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
    Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
    c9ba9b77
at91-poweroff.c 4.92 KB