]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mtd: dataflash: Export OF module alias information
authorJavier Martinez Canillas <javier@osg.samsung.com>
Thu, 20 Aug 2015 07:07:16 +0000 (09:07 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Sat, 22 Aug 2015 01:01:42 +0000 (18:01 -0700)
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@osg.samsung.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/devices/mtd_dataflash.c

index 0099aba72a8b519e7b1e31547a840f7977963324..df6f61137376c397fc05d3b9b658a8b6892addb5 100644 (file)
@@ -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
 
 /* ......................................................................... */