[PATCH] Signed-off-by: Richa Jha <richa.jha2@xxxxxxxxx>

From: Richa Jha
Date: Wed May 17 2017 - 06:12:53 EST


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