mtd: dataflash: Export OF module alias information

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Sep 1 14:59:05 PDT 2015


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=d1d97b76c4af41c8e836e73742c91cbf97d7483c
Commit:     d1d97b76c4af41c8e836e73742c91cbf97d7483c
Parent:     b226eca2088004622434cbcc27c6401b64f22d7c
Author:     Javier Martinez Canillas <javier at osg.samsung.com>
AuthorDate: Thu Aug 20 09:07:16 2015 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Fri Aug 21 18:01:42 2015 -0700

    mtd: dataflash: Export OF module alias information
    
    The SPI core currently reports the MODALIAS uevent as "spi:<modalias>"
    even for SPI devices that were registered by OF.
    
    That means the OF module alias exported by MODULE_OF_TABLE(of,...) is
    currently not used and user-space has no way to autoload this module.
    
    But it is still a good practice to add the OF module alias information
    into the kernel module even when it currently is unused so once the SPI
    core is changed to report a correct OF modalias uevent, module
    autoloading will be working for this driver.
    
    Signed-off-by: Javier Martinez Canillas <javier at osg.samsung.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/devices/mtd_dataflash.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 0099aba..df6f611 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -102,6 +102,7 @@ static const struct of_device_id dataflash_dt_ids[] = {
 	{ .compatible = "atmel,dataflash", },
 	{ /* sentinel */ }
 };
+MODULE_DEVICE_TABLE(of, dataflash_dt_ids);
 #endif
 
 /* ......................................................................... */



More information about the linux-mtd-cvs mailing list