summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-abracon.c8
-rw-r--r--drivers/rtc/rtc-ds1307.c9
2 files changed, 3 insertions, 14 deletions
diff --git a/drivers/rtc/rtc-abracon.c b/drivers/rtc/rtc-abracon.c
index 02de2f1063..571909bf71 100644
--- a/drivers/rtc/rtc-abracon.c
+++ b/drivers/rtc/rtc-abracon.c
@@ -10,7 +10,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <errno.h>
@@ -118,9 +117,4 @@ static struct driver_d abracon_driver = {
.probe = abracon_probe,
.id_table = abracon_id,
};
-
-static int __init abracon_init(void)
-{
- return i2c_driver_register(&abracon_driver);
-}
-device_initcall(abracon_init);
+device_i2c_driver(abracon_driver);
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 73d88ba6f2..bb597305e5 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -14,7 +14,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <malloc.h>
@@ -112,6 +111,7 @@ static struct platform_device_id ds1307_id[] = {
{ "ds1308", ds_1338 }, /* Difference 1308 to 1338 irrelevant */
{ "ds1338", ds_1338 },
{ "ds1341", ds_1341 },
+ { "ds3231", ds_1337 },
{ "pt7c4338", ds_1307 },
{ }
};
@@ -489,9 +489,4 @@ static struct driver_d ds1307_driver = {
.probe = ds1307_probe,
.id_table = ds1307_id,
};
-
-static int __init ds1307_init(void)
-{
- return i2c_driver_register(&ds1307_driver);
-}
-device_initcall(ds1307_init);
+device_i2c_driver(ds1307_driver);