aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-efi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-efi.c')
-rw-r--r--drivers/rtc/rtc-efi.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
index c9f890b088da..1a0c37c9152b 100644
--- a/drivers/rtc/rtc-efi.c
+++ b/drivers/rtc/rtc-efi.c
@@ -13,6 +13,8 @@
13 * 13 *
14 */ 14 */
15 15
16#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
17
16#include <linux/kernel.h> 18#include <linux/kernel.h>
17#include <linux/module.h> 19#include <linux/module.h>
18#include <linux/time.h> 20#include <linux/time.h>
@@ -47,7 +49,7 @@ compute_wday(efi_time_t *eft)
47 int ndays = 0; 49 int ndays = 0;
48 50
49 if (eft->year < 1998) { 51 if (eft->year < 1998) {
50 printk(KERN_ERR "efirtc: EFI year < 1998, invalid date\n"); 52 pr_err("EFI year < 1998, invalid date\n");
51 return -1; 53 return -1;
52 } 54 }
53 55
@@ -70,7 +72,7 @@ convert_to_efi_time(struct rtc_time *wtime, efi_time_t *eft)
70 eft->day = wtime->tm_mday; 72 eft->day = wtime->tm_mday;
71 eft->hour = wtime->tm_hour; 73 eft->hour = wtime->tm_hour;
72 eft->minute = wtime->tm_min; 74 eft->minute = wtime->tm_min;
73 eft->second = wtime->tm_sec; 75 eft->second = wtime->tm_sec;
74 eft->nanosecond = 0; 76 eft->nanosecond = 0;
75 eft->daylight = wtime->tm_isdst ? EFI_ISDST : 0; 77 eft->daylight = wtime->tm_isdst ? EFI_ISDST : 0;
76 eft->timezone = EFI_UNSPECIFIED_TIMEZONE; 78 eft->timezone = EFI_UNSPECIFIED_TIMEZONE;
@@ -142,7 +144,7 @@ static int efi_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm)
142 */ 144 */
143 status = efi.set_wakeup_time((efi_bool_t)wkalrm->enabled, &eft); 145 status = efi.set_wakeup_time((efi_bool_t)wkalrm->enabled, &eft);
144 146
145 printk(KERN_WARNING "write status is %d\n", (int)status); 147 dev_warn(dev, "write status is %d\n", (int)status);
146 148
147 return status == EFI_SUCCESS ? 0 : -EINVAL; 149 return status == EFI_SUCCESS ? 0 : -EINVAL;
148} 150}
@@ -157,7 +159,7 @@ static int efi_read_time(struct device *dev, struct rtc_time *tm)
157 159
158 if (status != EFI_SUCCESS) { 160 if (status != EFI_SUCCESS) {
159 /* should never happen */ 161 /* should never happen */
160 printk(KERN_ERR "efitime: can't read time\n"); 162 dev_err(dev, "can't read time\n");
161 return -EINVAL; 163 return -EINVAL;
162 } 164 }
163 165