]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rtc: pcf50633: Switch to use %ptR
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 4 Dec 2018 21:23:18 +0000 (23:23 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 10 Dec 2018 21:39:54 +0000 (22:39 +0100)
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>
drivers/rtc/rtc-pcf50633.c

index ef72b0c389d79ed01566550f2d67094e2c89a448..0eb05b1d0b945dcd3b0e5a343df765f58d7220a9 100644 (file)
@@ -131,9 +131,7 @@ static int pcf50633_rtc_read_time(struct device *dev, struct rtc_time *tm)
 
        pcf2rtc_time(tm, &pcf_tm);
 
-       dev_dbg(dev, "RTC_TIME: %u.%u.%u %u:%u:%u\n",
-               tm->tm_mday, tm->tm_mon, tm->tm_year,
-               tm->tm_hour, tm->tm_min, tm->tm_sec);
+       dev_dbg(dev, "RTC_TIME: %ptRr\n", tm);
 
        return 0;
 }
@@ -146,9 +144,7 @@ static int pcf50633_rtc_set_time(struct device *dev, struct rtc_time *tm)
 
        rtc = dev_get_drvdata(dev);
 
-       dev_dbg(dev, "RTC_TIME: %u.%u.%u %u:%u:%u\n",
-               tm->tm_mday, tm->tm_mon, tm->tm_year,
-               tm->tm_hour, tm->tm_min, tm->tm_sec);
+       dev_dbg(dev, "RTC_TIME: %ptRr\n", tm);
 
        rtc2pcf_time(&pcf_tm, tm);