]> git.hungrycats.org Git - linux/commitdiff
mtd: nand: tango: Export OF device ID table as module aliases
authorAndres Galacho <andresgalacho@gmail.com>
Mon, 1 May 2017 20:30:15 +0000 (16:30 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2017 13:07:41 +0000 (15:07 +0200)
commit 2761b4f12b017f6d3e5add386733a700a490df47 upstream.

The device table is required to load modules based on
modaliases. After adding MODULE_DEVICE_TABLE, below entries
for example will be added to module.alias:
alias:          of:N*T*Csigma,smp8758-nandC*
alias:          of:N*T*Csigma,smp8758-nand

Fixes: 6956e2385a16 ("mtd: nand: add tango NAND flash controller support")
Signed-off-by: Andres Galacho <andresgalacho@gmail.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/tango_nand.c

index 4a5e948c62df1b7d29ff9fe78b50e7d0858b01d5..2b1f55c3248a38b964ba394319a0b589bfc62639 100644 (file)
@@ -661,6 +661,7 @@ static const struct of_device_id tango_nand_ids[] = {
        { .compatible = "sigma,smp8758-nand" },
        { /* sentinel */ }
 };
+MODULE_DEVICE_TABLE(of, tango_nand_ids);
 
 static struct platform_driver tango_nand_driver = {
        .probe  = tango_nand_probe,