Skip to content

Commit b156b7f

Browse files
Javier Martinez CanillasBoris Brezillon
authored andcommitted
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: Javier Martinez Canillas <[email protected]> Signed-off-by: Boris Brezillon <[email protected]>
1 parent 1001354 commit b156b7f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/mtd/nand/omap2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2197,6 +2197,7 @@ static const struct of_device_id omap_nand_ids[] = {
21972197
{ .compatible = "ti,omap2-nand", },
21982198
{},
21992199
};
2200+
MODULE_DEVICE_TABLE(of, omap_nand_ids);
22002201

22012202
static struct platform_driver omap_nand_driver = {
22022203
.probe = omap_nand_probe,

0 commit comments

Comments
 (0)