aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-jz4740.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-jz4740.c')
-rw-r--r--drivers/rtc/rtc-jz4740.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c
index 72918c1ba092..64989afffa3d 100644
--- a/drivers/rtc/rtc-jz4740.c
+++ b/drivers/rtc/rtc-jz4740.c
@@ -17,6 +17,7 @@
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/module.h>
20#include <linux/of_device.h> 21#include <linux/of_device.h>
21#include <linux/platform_device.h> 22#include <linux/platform_device.h>
22#include <linux/reboot.h> 23#include <linux/reboot.h>
@@ -294,7 +295,7 @@ static void jz4740_rtc_power_off(void)
294 JZ_REG_RTC_RESET_COUNTER, reset_counter_ticks); 295 JZ_REG_RTC_RESET_COUNTER, reset_counter_ticks);
295 296
296 jz4740_rtc_poweroff(dev_for_power_off); 297 jz4740_rtc_poweroff(dev_for_power_off);
297 machine_halt(); 298 kernel_halt();
298} 299}
299 300
300static const struct of_device_id jz4740_rtc_of_match[] = { 301static const struct of_device_id jz4740_rtc_of_match[] = {
@@ -302,6 +303,7 @@ static const struct of_device_id jz4740_rtc_of_match[] = {
302 { .compatible = "ingenic,jz4780-rtc", .data = (void *)ID_JZ4780 }, 303 { .compatible = "ingenic,jz4780-rtc", .data = (void *)ID_JZ4780 },
303 {}, 304 {},
304}; 305};
306MODULE_DEVICE_TABLE(of, jz4740_rtc_of_match);
305 307
306static int jz4740_rtc_probe(struct platform_device *pdev) 308static int jz4740_rtc_probe(struct platform_device *pdev)
307{ 309{
@@ -429,6 +431,7 @@ static const struct platform_device_id jz4740_rtc_ids[] = {
429 { "jz4780-rtc", ID_JZ4780 }, 431 { "jz4780-rtc", ID_JZ4780 },
430 {} 432 {}
431}; 433};
434MODULE_DEVICE_TABLE(platform, jz4740_rtc_ids);
432 435
433static struct platform_driver jz4740_rtc_driver = { 436static struct platform_driver jz4740_rtc_driver = {
434 .probe = jz4740_rtc_probe, 437 .probe = jz4740_rtc_probe,
@@ -440,4 +443,9 @@ static struct platform_driver jz4740_rtc_driver = {
440 .id_table = jz4740_rtc_ids, 443 .id_table = jz4740_rtc_ids,
441}; 444};
442 445
443builtin_platform_driver(jz4740_rtc_driver); 446module_platform_driver(jz4740_rtc_driver);
447
448MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
449MODULE_LICENSE("GPL");
450MODULE_DESCRIPTION("RTC driver for the JZ4740 SoC\n");
451MODULE_ALIAS("platform:jz4740-rtc");