提交 2fa3e317 编写于 作者: J Javier Martinez Canillas 提交者: David S. Miller

net: ethernet: nb8800: Fix module autoload

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/aurora/nb8800.ko | grep alias
$

After this patch:

$ modinfo drivers/net/ethernet/aurora/nb8800.ko | grep alias
alias:          of:N*T*Csigma,smp8734-ethernetC*
alias:          of:N*T*Csigma,smp8734-ethernet
alias:          of:N*T*Csigma,smp8642-ethernetC*
alias:          of:N*T*Csigma,smp8642-ethernet
alias:          of:N*T*Caurora,nb8800C*
alias:          of:N*T*Caurora,nb8800
Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com>
Acked-by: NMans Rullgard <mans@mansr.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fc971a2f
......@@ -1358,6 +1358,7 @@ static const struct of_device_id nb8800_dt_ids[] = {
},
{ }
};
MODULE_DEVICE_TABLE(of, nb8800_dt_ids);
static int nb8800_probe(struct platform_device *pdev)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册