diff options
Diffstat (limited to 'drivers/rtc/rtc-proc.c')
| -rw-r--r-- | drivers/rtc/rtc-proc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-proc.c b/drivers/rtc/rtc-proc.c index cef5f5a3bbf9..d51d8f20e634 100644 --- a/drivers/rtc/rtc-proc.c +++ b/drivers/rtc/rtc-proc.c | |||
| @@ -23,7 +23,7 @@ static int rtc_proc_show(struct seq_file *seq, void *offset) | |||
| 23 | { | 23 | { |
| 24 | int err; | 24 | int err; |
| 25 | struct class_device *class_dev = seq->private; | 25 | struct class_device *class_dev = seq->private; |
| 26 | struct rtc_class_ops *ops = to_rtc_device(class_dev)->ops; | 26 | const struct rtc_class_ops *ops = to_rtc_device(class_dev)->ops; |
| 27 | struct rtc_wkalrm alrm; | 27 | struct rtc_wkalrm alrm; |
| 28 | struct rtc_time tm; | 28 | struct rtc_time tm; |
| 29 | 29 | ||
| @@ -61,7 +61,7 @@ static int rtc_proc_show(struct seq_file *seq, void *offset) | |||
| 61 | seq_printf(seq, "%02d-", alrm.time.tm_mon + 1); | 61 | seq_printf(seq, "%02d-", alrm.time.tm_mon + 1); |
| 62 | else | 62 | else |
| 63 | seq_printf(seq, "**-"); | 63 | seq_printf(seq, "**-"); |
| 64 | if ((unsigned int)alrm.time.tm_mday <= 31) | 64 | if (alrm.time.tm_mday && (unsigned int)alrm.time.tm_mday <= 31) |
| 65 | seq_printf(seq, "%02d\n", alrm.time.tm_mday); | 65 | seq_printf(seq, "%02d\n", alrm.time.tm_mday); |
| 66 | else | 66 | else |
| 67 | seq_printf(seq, "**\n"); | 67 | seq_printf(seq, "**\n"); |
| @@ -156,7 +156,7 @@ static void __exit rtc_proc_exit(void) | |||
| 156 | class_interface_unregister(&rtc_proc_interface); | 156 | class_interface_unregister(&rtc_proc_interface); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | module_init(rtc_proc_init); | 159 | subsys_initcall(rtc_proc_init); |
| 160 | module_exit(rtc_proc_exit); | 160 | module_exit(rtc_proc_exit); |
| 161 | 161 | ||
| 162 | MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>"); | 162 | MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>"); |
