summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-rx6110.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-12-05 00:23:23 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-12-11 00:40:05 +0300
commita3f60bb35fcad65ad1d727f93fcb19d6d932533b (patch)
tree994a48ee66fcb3d28796e2da3d686eb797120a07 /drivers/rtc/rtc-rx6110.c
parent0991e754b99cc262f7dfd5e33390404327446d51 (diff)
downloadlinux-a3f60bb35fcad65ad1d727f93fcb19d6d932533b.tar.xz
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>
Diffstat (limited to 'drivers/rtc/rtc-rx6110.c')
-rw-r--r--drivers/rtc/rtc-rx6110.c12
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 {
*/
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__,
- tm->tm_sec, tm->tm_min, tm->tm_hour,
- tm->tm_mday, tm->tm_mon, tm->tm_year);
+ pr_debug("%s: date %ptRr\n", __func__, tm);
/*
* 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)
tm->tm_mon = bcd2bin(data[RTC_MONTH] & 0x1f) - 1;
tm->tm_year = bcd2bin(data[RTC_YEAR]) + 100;
- pr_debug("%s: date %ds %dm %dh %dmd %dm %dy\n", __func__,
- tm->tm_sec, tm->tm_min, tm->tm_hour,
- tm->tm_mday, tm->tm_mon, tm->tm_year);
+ pr_debug("%s: date %ptRr\n", __func__, tm);
/*
* 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)
if (ret)
return ret;
- dev_dbg(dev, "%s: date %ds %dm %dh %dmd %dm %dy\n", __func__,
- tm->tm_sec, tm->tm_min, tm->tm_hour,
- tm->tm_mday, tm->tm_mon, tm->tm_year);
+ dev_dbg(dev, "%s: date %ptRr\n", __func__, tm);
return 0;
}