提交 b156b7f2 编写于 作者: J Javier Martinez Canillas 提交者: Boris Brezillon

mtd: nand: omap2: 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/mtd/nand/omap2_nand.ko | grep alias
alias:          platform:omap2-nand

After this patch:

$ modinfo drivers/mtd/nand/omap2_nand.ko | grep alias
alias:          platform:omap2-nand
alias:          of:N*T*Cti,omap2-nandC*
alias:          of:N*T*Cti,omap2-nand
Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
上级 1001354c
...@@ -2197,6 +2197,7 @@ static const struct of_device_id omap_nand_ids[] = { ...@@ -2197,6 +2197,7 @@ static const struct of_device_id omap_nand_ids[] = {
{ .compatible = "ti,omap2-nand", }, { .compatible = "ti,omap2-nand", },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, omap_nand_ids);
static struct platform_driver omap_nand_driver = { static struct platform_driver omap_nand_driver = {
.probe = omap_nand_probe, .probe = omap_nand_probe,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册