Module Name:    src
Committed By:   thorpej
Date:           Sun Jan 17 21:47:50 UTC 2021

Modified Files:
        src/sys/dev/i2c: ihidev.c tsllux.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/i2c/ihidev.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/tsllux.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2c/ihidev.c
diff -u src/sys/dev/i2c/ihidev.c:1.12 src/sys/dev/i2c/ihidev.c:1.13
--- src/sys/dev/i2c/ihidev.c:1.12	Thu Jan  9 04:04:01 2020
+++ src/sys/dev/i2c/ihidev.c	Sun Jan 17 21:47:50 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ihidev.c,v 1.12 2020/01/09 04:04:01 thorpej Exp $ */
+/* $NetBSD: ihidev.c,v 1.13 2021/01/17 21:47:50 thorpej Exp $ */
 /* $OpenBSD ihidev.c,v 1.13 2017/04/08 02:57:23 deraadt Exp $ */
 
 /*-
@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.12 2020/01/09 04:04:01 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.13 2021/01/17 21:47:50 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -126,8 +126,9 @@ static int	ihidev_print(void *, const ch
 static int	ihidev_submatch(device_t, cfdata_t, const int *, void *);
 
 static const struct device_compatible_entry compat_data[] = {
-	{ "hid-over-i2c",		0 },
-	{ NULL,				0 }
+	{ .compat = "hid-over-i2c" },
+
+	{ 0 }
 };
 
 static int

Index: src/sys/dev/i2c/tsllux.c
diff -u src/sys/dev/i2c/tsllux.c:1.1 src/sys/dev/i2c/tsllux.c:1.2
--- src/sys/dev/i2c/tsllux.c:1.1	Mon Jan  4 22:09:35 2021
+++ src/sys/dev/i2c/tsllux.c	Sun Jan 17 21:47:50 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tsllux.c,v 1.1 2021/01/04 22:09:35 thorpej Exp $ */
+/* $NetBSD: tsllux.c,v 1.2 2021/01/17 21:47:50 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2018 Jason R. Thorpe
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tsllux.c,v 1.1 2021/01/04 22:09:35 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tsllux.c,v 1.2 2021/01/17 21:47:50 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -78,9 +78,10 @@ CFATTACH_DECL_NEW(tsllux, sizeof(struct 
     tsllux_match, tsllux_attach, NULL, NULL);
 
 static const struct device_compatible_entry tsllux_compat_data[] = {
-	{ "amstaos,tsl2560",		0 },
-	{ "amstaos,tsl2561",		0 },
-	{ NULL,				0 }
+	{ .compat = "amstaos,tsl2560" },
+	{ .compat = "amstaos,tsl2561" },
+
+	{ 0 }
 };
 
 static int	tsllux_read1(struct tsllux_softc *, uint8_t, uint8_t *);

Reply via email to