public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] C99 initializers for drivers/char/rtc.c
@ 2003-02-15 20:37 Art Haas
  0 siblings, 0 replies; only message in thread
From: Art Haas @ 2003-02-15 20:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds

Hi.

This patch converts the file to use C99 initializers to improve
readability and remove warnings if '-W' is used.

Art Haas

===== drivers/char/rtc.c 1.21 vs edited =====
--- 1.21/drivers/char/rtc.c	Sun Feb  9 19:29:56 2003
+++ edited/drivers/char/rtc.c	Sat Feb 15 12:17:36 2003
@@ -211,19 +211,37 @@
  * sysctl-tuning infrastructure.
  */
 static ctl_table rtc_table[] = {
-    { 1, "max-user-freq", &rtc_max_user_freq, sizeof(int), 0644, NULL,
-      &proc_dointvec, NULL, },
-    { 0, }
+	{
+		.ctl_name	= 1,
+		.procname	= "max-user-freq",
+		.data		= &rtc_max_user_freq,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec,
+	},
+	{ .ctl_name = 0 }
 };
 
 static ctl_table rtc_root[] = {
-    { 1, "rtc", NULL, 0, 0555, rtc_table, },
-    { 0, }
+	{
+		.ctl_name	= 1,
+		.procname	= "rtc",
+		.maxlen		= 0,
+		.mode		= 0555,
+		.child		= rtc_table,
+	},
+	{ .ctl_name = 0 }
 };
 
 static ctl_table dev_root[] = {
-    { CTL_DEV, "dev", NULL, 0, 0555, rtc_root, },
-    { 0, }
+	{
+		.ctl_name	= CTL_DEV,
+		.procname	= "dev",
+		.maxlen		= 0,
+		.mode		= 0555,
+		.child		= rtc_root,
+	},
+	{ .ctl_name = 0 }
 };
 
 static struct ctl_table_header *sysctl_header;
-- 
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-02-15 20:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-15 20:37 [PATCH] C99 initializers for drivers/char/rtc.c Art Haas

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