diff options
Diffstat (limited to 'drivers/rtc/rtc-max8997.c')
| -rw-r--r-- | drivers/rtc/rtc-max8997.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-max8997.c b/drivers/rtc/rtc-max8997.c index 67fbe559d535..9e02bcda0c09 100644 --- a/drivers/rtc/rtc-max8997.c +++ b/drivers/rtc/rtc-max8997.c | |||
| @@ -12,6 +12,8 @@ | |||
| 12 | * | 12 | * |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 16 | |||
| 15 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
| 16 | #include <linux/rtc.h> | 18 | #include <linux/rtc.h> |
| 17 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
| @@ -107,8 +109,8 @@ static int max8997_rtc_tm_to_data(struct rtc_time *tm, u8 *data) | |||
| 107 | data[RTC_YEAR] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; | 109 | data[RTC_YEAR] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; |
| 108 | 110 | ||
| 109 | if (tm->tm_year < 100) { | 111 | if (tm->tm_year < 100) { |
| 110 | pr_warn("%s: MAX8997 RTC cannot handle the year %d." | 112 | pr_warn("RTC cannot handle the year %d. Assume it's 2000.\n", |
| 111 | "Assume it's 2000.\n", __func__, 1900 + tm->tm_year); | 113 | 1900 + tm->tm_year); |
| 112 | return -EINVAL; | 114 | return -EINVAL; |
| 113 | } | 115 | } |
| 114 | return 0; | 116 | return 0; |
| @@ -424,7 +426,7 @@ static void max8997_rtc_enable_smpl(struct max8997_rtc_info *info, bool enable) | |||
| 424 | 426 | ||
| 425 | val = 0; | 427 | val = 0; |
| 426 | max8997_read_reg(info->rtc, MAX8997_RTC_WTSR_SMPL, &val); | 428 | max8997_read_reg(info->rtc, MAX8997_RTC_WTSR_SMPL, &val); |
| 427 | pr_info("%s: WTSR_SMPL(0x%02x)\n", __func__, val); | 429 | pr_info("WTSR_SMPL(0x%02x)\n", val); |
| 428 | } | 430 | } |
| 429 | 431 | ||
| 430 | static int max8997_rtc_init_reg(struct max8997_rtc_info *info) | 432 | static int max8997_rtc_init_reg(struct max8997_rtc_info *info) |
