diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-12-04 16:23:23 -0500 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-12-10 16:40:05 -0500 |
commit | a3f60bb35fcad65ad1d727f93fcb19d6d932533b (patch) | |
tree | 994a48ee66fcb3d28796e2da3d686eb797120a07 | |
parent | 0991e754b99cc262f7dfd5e33390404327446d51 (diff) |
rtc: rx6110: Switch to use %ptR
Use %ptR instead of open coded variant to print content of
struct rtc_time in human readable format.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r-- | drivers/rtc/rtc-rx6110.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-rx6110.c b/drivers/rtc/rtc-rx6110.c index 8e322d884cc2..5899ca368d59 100644 --- a/drivers/rtc/rtc-rx6110.c +++ b/drivers/rtc/rtc-rx6110.c | |||
@@ -114,9 +114,7 @@ struct rx6110_data { | |||
114 | */ | 114 | */ |
115 | static int rx6110_rtc_tm_to_data(struct rtc_time *tm, u8 *data) | 115 | static int rx6110_rtc_tm_to_data(struct rtc_time *tm, u8 *data) |
116 | { | 116 | { |
117 | pr_debug("%s: date %ds %dm %dh %dmd %dm %dy\n", __func__, | 117 | pr_debug("%s: date %ptRr\n", __func__, tm); |
118 | tm->tm_sec, tm->tm_min, tm->tm_hour, | ||
119 | tm->tm_mday, tm->tm_mon, tm->tm_year); | ||
120 | 118 | ||
121 | /* | 119 | /* |
122 | * The year in the RTC is a value between 0 and 99. | 120 | * The year in the RTC is a value between 0 and 99. |
@@ -154,9 +152,7 @@ static int rx6110_data_to_rtc_tm(u8 *data, struct rtc_time *tm) | |||
154 | tm->tm_mon = bcd2bin(data[RTC_MONTH] & 0x1f) - 1; | 152 | tm->tm_mon = bcd2bin(data[RTC_MONTH] & 0x1f) - 1; |
155 | tm->tm_year = bcd2bin(data[RTC_YEAR]) + 100; | 153 | tm->tm_year = bcd2bin(data[RTC_YEAR]) + 100; |
156 | 154 | ||
157 | pr_debug("%s: date %ds %dm %dh %dmd %dm %dy\n", __func__, | 155 | pr_debug("%s: date %ptRr\n", __func__, tm); |
158 | tm->tm_sec, tm->tm_min, tm->tm_hour, | ||
159 | tm->tm_mday, tm->tm_mon, tm->tm_year); | ||
160 | 156 | ||
161 | /* | 157 | /* |
162 | * The year in the RTC is a value between 0 and 99. | 158 | * The year in the RTC is a value between 0 and 99. |
@@ -248,9 +244,7 @@ static int rx6110_get_time(struct device *dev, struct rtc_time *tm) | |||
248 | if (ret) | 244 | if (ret) |
249 | return ret; | 245 | return ret; |
250 | 246 | ||
251 | dev_dbg(dev, "%s: date %ds %dm %dh %dmd %dm %dy\n", __func__, | 247 | dev_dbg(dev, "%s: date %ptRr\n", __func__, tm); |
252 | tm->tm_sec, tm->tm_min, tm->tm_hour, | ||
253 | tm->tm_mday, tm->tm_mon, tm->tm_year); | ||
254 | 248 | ||
255 | return 0; | 249 | return 0; |
256 | } | 250 | } |