Skip to contentSkip to conversation

RTC: Add MODULE_DEVICE_TABLE to rtc-ds1672/rtc-max6900/rtc-max8998

PATCH Applied Axel Lin 2 participants 2 messages Apr 18, 2011 – May 18, 2015 Real time clock (RTC)

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 RTC: Add MODULE_DEVICE_TABLE to rtc-ds1672/rtc-max6900/rtc-max8998

The device table is required to load modules based on modaliases. After adding MODULE_DEVICE_TABLE, below entries will be added to modules.alias:

alias i2c:ds1672 rtc_ds1672
alias i2c:max6900 rtc_max6900
alias platform:lp3974-rtc rtc_max8998 alias platform:max8998-rtc rtc_max8998

Cc Alessandro Zummo <[email protected]>
Cc Dale Farnsworth <[email protected]>
Cc Minkyu Kang <[email protected]>
Cc Joonyoung Shim <[email protected]>
---
 drivers/rtc/rtc-ds1672.c  |    1 +
 drivers/rtc/rtc-max6900.c |    1 +
 drivers/rtc/rtc-max8998.c |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)
drivers/rtc/rtc-ds1672.c +1 -0
index 06dfb54..fa301d4 100644
@@ -191,6 +191,7 @@ static struct i2c_device_id ds1672_id[] = {
 	{ "ds1672", 0 },
 	{ }
 };
+MODULE_DEVICE_TABLE(i2c, ds1672_id);
 
 static struct i2c_driver ds1672_driver = {
 	.driver = {
drivers/rtc/rtc-max6900.c +1 -0
index 486142c..ef834c1 100644
@@ -251,6 +251,7 @@ static struct i2c_device_id max6900_id[] = {
 	{ "max6900", 0 },
 	{ }
 };
+MODULE_DEVICE_TABLE(i2c, max6900_id);
 
 static struct i2c_driver max6900_driver = {
 	.driver = {
drivers/rtc/rtc-max8998.c +1 -0
index 3f7bc6b..dade62e 100644
@@ -315,6 +315,7 @@ static const struct platform_device_id max8998_rtc_id[] = {
 	{ "lp3974-rtc", TYPE_LP3974 },
 	{ }
 };
+MODULE_DEVICE_TABLE(platform, max8998_rtc_id);
 
 static struct platform_driver max8998_rtc_driver = {
 	.driver		= {
#1 lore raw
Quoted 13 lines · Axel Lin

The device table is required to load modules based on modaliases. After adding MODULE_DEVICE_TABLE, below entries will be added to modules.alias:

alias i2c:ds1672 rtc_ds1672
alias i2c:max6900 rtc_max6900
alias platform:lp3974-rtc rtc_max8998 alias platform:max8998-rtc rtc_max8998

Cc Alessandro Zummo <[email protected]>
Cc Dale Farnsworth <[email protected]>
Cc Minkyu Kang <[email protected]>
Cc Joonyoung Shim <[email protected]>
Quoted 6 lines
---
 drivers/rtc/rtc-ds1672.c  |    1 +
 drivers/rtc/rtc-max6900.c |    1 +
 drivers/rtc/rtc-max8998.c |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

Applied, thanks.

Signature · 14 lines
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.