mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Signed-off-by: Richa Jha <richa.jha2@gmail.com>
@ 2017-05-17 10:12 Richa Jha
  2017-05-17 12:02 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Richa Jha @ 2017-05-17 10:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: Richa Jha

 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-17 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 10:12 [PATCH] Signed-off-by: Richa Jha <richa.jha2@gmail.com> Richa Jha
2017-05-17 12:02 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®