Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1661256 > unrolled thread

[PATCH v1 23/25] Input: hp_sdc_rtc - Switch to use %pt

Started byAndy Shevchenko <andriy.shevchenko@linux.intel.com>
First post2017-06-08 16:00 +0200
Last post2017-06-08 16:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v1 23/25] Input: hp_sdc_rtc - Switch to use %pt Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-06-08 16:00 +0200

#1661256 — [PATCH v1 23/25] Input: hp_sdc_rtc - Switch to use %pt

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2017-06-08 16:00 +0200
Subject[PATCH v1 23/25] Input: hp_sdc_rtc - Switch to use %pt
Message-ID<tQ68G-50i-17@gated-at.bofh.it>
Use %pt instead of open coded variant to print content of
struct rtc_time in human readable format.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/input/misc/hp_sdc_rtc.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c
index 1c8c56efc995..9a6afc3a4775 100644
--- a/drivers/input/misc/hp_sdc_rtc.c
+++ b/drivers/input/misc/hp_sdc_rtc.c
@@ -441,12 +441,10 @@ static int hp_sdc_rtc_proc_show(struct seq_file *m, void *v)
 		seq_puts(m, "BBRTC\t\t: READ FAILED!\n");
 	} else {
 		seq_printf(m,
-			     "rtc_time\t: %02d:%02d:%02d\n"
-			     "rtc_date\t: %04d-%02d-%02d\n"
+			     "rtc_time\t: %ptt\n"
+			     "rtc_date\t: %ptd\n"
 			     "rtc_epoch\t: %04lu\n",
-			     tm.tm_hour, tm.tm_min, tm.tm_sec,
-			     tm.tm_year + 1900, tm.tm_mon + 1, 
-			     tm.tm_mday, epoch);
+			     &tm, &tm, epoch);
 	}
 
 	if (hp_sdc_rtc_read_rt(&tv)) {
-- 
2.11.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web