[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1495015945-6404-1-git-send-email-richa.jha2@gmail.com>
Date: Wed, 17 May 2017 15:42:25 +0530
From: Richa Jha <richa.jha2@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Richa Jha <richa.jha2@...il.com>
Subject: [PATCH] Signed-off-by: Richa Jha <richa.jha2@...il.com>
From short to string conversion
---
drivers/char/efirtc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/char/efirtc.c b/drivers/char/efirtc.c
index dc62568..b8a4d02 100644
--- a/drivers/char/efirtc.c
+++ b/drivers/char/efirtc.c
@@ -302,6 +302,7 @@ static int efi_rtc_proc_show(struct seq_file *m, void *v)
efi_time_cap_t cap;
efi_bool_t enabled, pending;
unsigned long flags;
+ char str_timezone[128];
memset(&eft, 0, sizeof(eft));
memset(&alm, 0, sizeof(alm));
@@ -326,7 +327,9 @@ static int efi_rtc_proc_show(struct seq_file *m, void *v)
seq_puts(m, "Timezone : unspecified\n");
else
/* XXX fixme: convert to string? */
- seq_printf(m, "Timezone : %u\n", eft.timezone);
+ for(i= eft.timezone,c=0; i>0 ;c++,i=i/10)
+ str_timezone[c] = i%10 - 48
+ seq_puts(m, str_timezone);
seq_printf(m,
--
2.1.4
Powered by blists - more mailing lists