OSDN Git Service

rtc: m41t80: Switch to use %ptR
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 4 Dec 2018 21:23:15 +0000 (23:23 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 10 Dec 2018 21:39:47 +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-m41t80.c

index a391389..ebf50b1 100644 (file)
@@ -942,11 +942,7 @@ static int m41t80_probe(struct i2c_client *client,
                if (m41t80_data->features & M41T80_FEATURE_HT) {
                        m41t80_rtc_read_time(&client->dev, &tm);
                        dev_info(&client->dev, "HT bit was set!\n");
-                       dev_info(&client->dev,
-                                "Power Down at %04i-%02i-%02i %02i:%02i:%02i\n",
-                                tm.tm_year + 1900,
-                                tm.tm_mon + 1, tm.tm_mday, tm.tm_hour,
-                                tm.tm_min, tm.tm_sec);
+                       dev_info(&client->dev, "Power Down at %ptR\n", &tm);
                }
                rc = i2c_smbus_write_byte_data(client, M41T80_REG_ALARM_HOUR,
                                               rc & ~M41T80_ALHOUR_HT);