rtc: puv3: Switch to use %ptR
Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
4f5ef6eec4
commit
b2db0a291a
|
@ -90,9 +90,7 @@ static int puv3_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm)
|
|||
{
|
||||
rtc_time_to_tm(readl(RTC_RCNR), rtc_tm);
|
||||
|
||||
dev_dbg(dev, "read time %02x.%02x.%02x %02x/%02x/%02x\n",
|
||||
rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday,
|
||||
rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec);
|
||||
dev_dbg(dev, "read time %ptRr\n", rtc_tm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -101,9 +99,7 @@ static int puv3_rtc_settime(struct device *dev, struct rtc_time *tm)
|
|||
{
|
||||
unsigned long rtc_count = 0;
|
||||
|
||||
dev_dbg(dev, "set time %02d.%02d.%02d %02d/%02d/%02d\n",
|
||||
tm->tm_year, tm->tm_mon, tm->tm_mday,
|
||||
tm->tm_hour, tm->tm_min, tm->tm_sec);
|
||||
dev_dbg(dev, "set time %ptRr\n", tm);
|
||||
|
||||
rtc_tm_to_time(tm, &rtc_count);
|
||||
writel(rtc_count, RTC_RCNR);
|
||||
|
@ -119,10 +115,7 @@ static int puv3_rtc_getalarm(struct device *dev, struct rtc_wkalrm *alrm)
|
|||
|
||||
alrm->enabled = readl(RTC_RTSR) & RTC_RTSR_ALE;
|
||||
|
||||
dev_dbg(dev, "read alarm %02x %02x.%02x.%02x %02x/%02x/%02x\n",
|
||||
alrm->enabled,
|
||||
alm_tm->tm_year, alm_tm->tm_mon, alm_tm->tm_mday,
|
||||
alm_tm->tm_hour, alm_tm->tm_min, alm_tm->tm_sec);
|
||||
dev_dbg(dev, "read alarm: %d, %ptRr\n", alrm->enabled, alm_tm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -132,10 +125,7 @@ static int puv3_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
|
|||
struct rtc_time *tm = &alrm->time;
|
||||
unsigned long rtcalarm_count = 0;
|
||||
|
||||
dev_dbg(dev, "puv3_rtc_setalarm: %d, %02x/%02x/%02x %02x.%02x.%02x\n",
|
||||
alrm->enabled,
|
||||
tm->tm_mday & 0xff, tm->tm_mon & 0xff, tm->tm_year & 0xff,
|
||||
tm->tm_hour & 0xff, tm->tm_min & 0xff, tm->tm_sec);
|
||||
dev_dbg(dev, "set alarm: %d, %ptRr\n", alrm->enabled, tm);
|
||||
|
||||
rtc_tm_to_time(tm, &rtcalarm_count);
|
||||
writel(rtcalarm_count, RTC_RTAR);
|
||||
|
|
Loading…
Reference in a new issue