diff mbox

[1/2] rtc: max77686: Report platform modalias to fix module autoload

Message ID 1431530282-10672-2-git-send-email-javier.martinez@collabora.co.uk (mailing list archive)
State Accepted
Commit 2d0cca0db4134712c7a67694c5aab57a49e228f2
Headers show

Commit Message

Javier Martinez Canillas May 13, 2015, 3:18 p.m. UTC
If the rtc-max77686 driver is built as a module, modalias information is
not filled so the module is not autoloaded. Use the MODULE_DEVICE_TABLE()
macro to export the platform ID table so the module contains that data.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 drivers/rtc/rtc-max77686.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index 7632a87784c3..7184a0eda793 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -511,6 +511,7 @@  static const struct platform_device_id rtc_id[] = {
 	{ "max77686-rtc", 0 },
 	{},
 };
+MODULE_DEVICE_TABLE(platform, rtc_id);
 
 static struct platform_driver max77686_rtc_driver = {
 	.driver		= {