Commit a3f60bb3 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Alexandre Belloni

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 0991e754
...@@ -114,9 +114,7 @@ struct rx6110_data { ...@@ -114,9 +114,7 @@ struct rx6110_data {
*/ */
static int rx6110_rtc_tm_to_data(struct rtc_time *tm, u8 *data) static int rx6110_rtc_tm_to_data(struct rtc_time *tm, u8 *data)
{ {
pr_debug("%s: date %ds %dm %dh %dmd %dm %dy\n", __func__, pr_debug("%s: date %ptRr\n", __func__, tm);
tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon, tm->tm_year);
/* /*
* The year in the RTC is a value between 0 and 99. * 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,9 +152,7 @@ static int rx6110_data_to_rtc_tm(u8 *data, struct rtc_time *tm)
tm->tm_mon = bcd2bin(data[RTC_MONTH] & 0x1f) - 1; tm->tm_mon = bcd2bin(data[RTC_MONTH] & 0x1f) - 1;
tm->tm_year = bcd2bin(data[RTC_YEAR]) + 100; tm->tm_year = bcd2bin(data[RTC_YEAR]) + 100;
pr_debug("%s: date %ds %dm %dh %dmd %dm %dy\n", __func__, pr_debug("%s: date %ptRr\n", __func__, tm);
tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon, tm->tm_year);
/* /*
* The year in the RTC is a value between 0 and 99. * 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,9 +244,7 @@ static int rx6110_get_time(struct device *dev, struct rtc_time *tm)
if (ret) if (ret)
return ret; return ret;
dev_dbg(dev, "%s: date %ds %dm %dh %dmd %dm %dy\n", __func__, dev_dbg(dev, "%s: date %ptRr\n", __func__, tm);
tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon, tm->tm_year);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment