Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Use designated initializers and a consistent termin...



details:   https://anonhg.NetBSD.org/src/rev/15ddf479a7b1
branches:  trunk
changeset: 979954:15ddf479a7b1
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Jan 17 21:02:33 2021 +0000

description:
Use designated initializers and a consistent termination style in
compat_data[].

diffstat:

 sys/arch/macppc/dev/deq.c              |  17 +++++++++--------
 sys/arch/macppc/dev/lmu.c              |  11 ++++++-----
 sys/arch/macppc/dev/psoc.c             |   9 +++++----
 sys/arch/macppc/dev/smusat.c           |   7 ++++---
 sys/arch/sparc64/dev/pcf8591_envctrl.c |   9 +++++----
 5 files changed, 29 insertions(+), 24 deletions(-)

diffs (147 lines):

diff -r 8e7a59cf202d -r 15ddf479a7b1 sys/arch/macppc/dev/deq.c
--- a/sys/arch/macppc/dev/deq.c Sun Jan 17 19:53:05 2021 +0000
+++ b/sys/arch/macppc/dev/deq.c Sun Jan 17 21:02:33 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: deq.c,v 1.17 2019/09/20 17:25:11 macallan Exp $        */
+/*     $NetBSD: deq.c,v 1.18 2021/01/17 21:02:33 thorpej Exp $ */
 
 /*-
  * Copyright (C) 2005 Michael Lorenz
@@ -32,7 +32,7 @@
  */
  
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: deq.c,v 1.17 2019/09/20 17:25:11 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: deq.c,v 1.18 2021/01/17 21:02:33 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -53,12 +53,13 @@
     deq_match, deq_attach, NULL, NULL);
 
 static const struct device_compatible_entry compat_data[] = {
-       { "deq",                0 },
-       { "tas3004",            0 },
-       { "pcm3052",            0 },
-       { "cs8416",             0 },
-       { "codec",              0 },
-       { NULL,                 0 }
+       { .compat = "deq" },
+       { .compat = "tas3004" },
+       { .compat = "pcm3052" },
+       { .compat = "cs8416" },
+       { .compat = "codec" },
+
+       { 0 }
 };
 
 int
diff -r 8e7a59cf202d -r 15ddf479a7b1 sys/arch/macppc/dev/lmu.c
--- a/sys/arch/macppc/dev/lmu.c Sun Jan 17 19:53:05 2021 +0000
+++ b/sys/arch/macppc/dev/lmu.c Sun Jan 17 21:02:33 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lmu.c,v 1.5 2020/09/12 18:12:53 macallan Exp $ */
+/* $NetBSD: lmu.c,v 1.6 2021/01/17 21:02:33 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2020 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lmu.c,v 1.5 2020/09/12 18:12:53 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lmu.c,v 1.6 2021/01/17 21:02:33 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -81,9 +81,10 @@
     lmu_match, lmu_attach, NULL, NULL);
 
 static const struct device_compatible_entry compat_data[] = {
-       { "lmu-micro",          0 },
-       { "lmu-controller",     0 },
-       { NULL,                 0 }
+       { .compat = "lmu-micro" },
+       { .compat = "lmu-controller" },
+
+       { 0 }
 };
 
 /* time between polling the light sensors */
diff -r 8e7a59cf202d -r 15ddf479a7b1 sys/arch/macppc/dev/psoc.c
--- a/sys/arch/macppc/dev/psoc.c        Sun Jan 17 19:53:05 2021 +0000
+++ b/sys/arch/macppc/dev/psoc.c        Sun Jan 17 21:02:33 2021 +0000
@@ -1,4 +1,4 @@
- /* $NetBSD: psoc.c,v 1.3 2019/11/23 05:13:11 macallan Exp $ */
+ /* $NetBSD: psoc.c,v 1.4 2021/01/17 21:02:33 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2019 Michael Lorenz
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: psoc.c,v 1.3 2019/11/23 05:13:11 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: psoc.c,v 1.4 2021/01/17 21:02:33 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -81,8 +81,9 @@
     psoc_match, psoc_attach, NULL, NULL);
 
 static const struct device_compatible_entry compat_data[] = {
-       { "Psoc",               0 },
-       { NULL,                 0 }
+       { .compat = "Psoc" },
+
+       { 0 }
 };
 
 static int
diff -r 8e7a59cf202d -r 15ddf479a7b1 sys/arch/macppc/dev/smusat.c
--- a/sys/arch/macppc/dev/smusat.c      Sun Jan 17 19:53:05 2021 +0000
+++ b/sys/arch/macppc/dev/smusat.c      Sun Jan 17 21:02:33 2021 +0000
@@ -106,9 +106,10 @@
     smusat_match, smusat_attach, NULL, NULL);
 
 static const struct device_compatible_entry compat_data[] = {
-       { "sat",                0 },
-       { "smu-sat",            0 },
-       { NULL,                 0 }
+       { .compat = "sat" },
+       { .compat = "smu-sat" },
+
+       { 0 }
 };
 
 static int
diff -r 8e7a59cf202d -r 15ddf479a7b1 sys/arch/sparc64/dev/pcf8591_envctrl.c
--- a/sys/arch/sparc64/dev/pcf8591_envctrl.c    Sun Jan 17 19:53:05 2021 +0000
+++ b/sys/arch/sparc64/dev/pcf8591_envctrl.c    Sun Jan 17 21:02:33 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcf8591_envctrl.c,v 1.16 2020/12/23 07:09:50 jdc Exp $ */
+/*     $NetBSD: pcf8591_envctrl.c,v 1.17 2021/01/17 21:03:27 thorpej Exp $     */
 /*     $OpenBSD: pcf8591_envctrl.c,v 1.6 2007/10/25 21:17:20 kettenis Exp $ */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcf8591_envctrl.c,v 1.16 2020/12/23 07:09:50 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcf8591_envctrl.c,v 1.17 2021/01/17 21:03:27 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -97,8 +97,9 @@
        DVF_DETACH_SHUTDOWN);
 
 static const struct device_compatible_entry compat_data[] = {
-       { "ecadc",              0 },
-       { NULL,                 0 }
+       { .compat = "ecadc" },
+
+       { 0 }
 };
 
 static int



Home | Main Index | Thread Index | Old Index