Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 use designated initializer for struct pic i...



details:   https://anonhg.NetBSD.org/src/rev/1e88ec93777f
branches:  trunk
changeset: 565485:1e88ec93777f
user:      kochi <kochi%NetBSD.org@localhost>
date:      Sat Apr 10 14:49:55 2004 +0000

description:
use designated initializer for struct pic initializers.
just for readability.

diffstat:

 sys/arch/x86/x86/i8259.c |  24 +++++++++++++-----------
 sys/arch/x86/x86/intr.c  |  17 +++++++----------
 sys/arch/x86/x86/lapic.c |  20 +++++++++++---------
 3 files changed, 31 insertions(+), 30 deletions(-)

diffs (124 lines):

diff -r 8134a7664b09 -r 1e88ec93777f sys/arch/x86/x86/i8259.c
--- a/sys/arch/x86/x86/i8259.c  Sat Apr 10 14:17:21 2004 +0000
+++ b/sys/arch/x86/x86/i8259.c  Sat Apr 10 14:49:55 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i8259.c,v 1.4 2003/08/07 16:30:34 agc Exp $    */
+/*     $NetBSD: i8259.c,v 1.5 2004/04/10 14:49:55 kochi Exp $  */
 
 /*
  * Copyright 2002 (c) Wasabi Systems, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i8259.c,v 1.4 2003/08/07 16:30:34 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i8259.c,v 1.5 2004/04/10 14:49:55 kochi Exp $");
 
 #include <sys/param.h> 
 #include <sys/systm.h>
@@ -107,15 +107,17 @@
  * Perhaps this should be made into a real device.
  */
 struct pic i8259_pic = {
-       {0, {NULL}, NULL, NULL, NULL, 0, "pic0", NULL, 0},
-       PIC_I8259,
-       __SIMPLELOCK_UNLOCKED,
-       i8259_hwmask,
-       i8259_hwunmask,
-       i8259_setup,
-       i8259_setup,
-       i8259_stubs,
-       i8259_stubs,
+       .pic_dev = {
+               .dv_xname = "pic0",
+       },
+       .pic_type = PIC_I8259,
+       .pic_lock = __SIMPLELOCK_UNLOCKED,
+       .pic_hwmask = i8259_hwmask,
+       .pic_hwunmask = i8259_hwunmask,
+       .pic_addroute = i8259_setup,
+       .pic_delroute = i8259_setup,
+       .pic_level_stubs = i8259_stubs,
+       .pic_edge_stubs = i8259_stubs,
 };
 
 void
diff -r 8134a7664b09 -r 1e88ec93777f sys/arch/x86/x86/intr.c
--- a/sys/arch/x86/x86/intr.c   Sat Apr 10 14:17:21 2004 +0000
+++ b/sys/arch/x86/x86/intr.c   Sat Apr 10 14:49:55 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.14 2004/02/20 18:04:06 yamt Exp $   */
+/*     $NetBSD: intr.c,v 1.15 2004/04/10 14:49:55 kochi Exp $  */
 
 /*
  * Copyright 2002 (c) Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.14 2004/02/20 18:04:06 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.15 2004/04/10 14:49:55 kochi Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -73,14 +73,11 @@
 #endif
 
 struct pic softintr_pic = {
-        {0, {0}, NULL, NULL, NULL, 0, "softintr_fakepic", NULL, 0},
-        PIC_SOFT,
-        __SIMPLELOCK_UNLOCKED,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
+       .pic_dev = {
+               .dv_xname = "softintr_fakepic",
+       },
+       .pic_type = PIC_SOFT,
+       .pic_lock = __SIMPLELOCK_UNLOCKED,
 };
 
 #if NIOAPIC > 0
diff -r 8134a7664b09 -r 1e88ec93777f sys/arch/x86/x86/lapic.c
--- a/sys/arch/x86/x86/lapic.c  Sat Apr 10 14:17:21 2004 +0000
+++ b/sys/arch/x86/x86/lapic.c  Sat Apr 10 14:49:55 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lapic.c,v 1.4 2004/02/13 11:36:20 wiz Exp $ */
+/* $NetBSD: lapic.c,v 1.5 2004/04/10 14:49:55 kochi Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.4 2004/02/13 11:36:20 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.5 2004/04/10 14:49:55 kochi Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -82,13 +82,15 @@
 extern char idt_allocmap[];
 
 struct pic local_pic = {
-       {0, {NULL}, NULL, NULL, NULL, 0, "lapic", NULL, 0},
-       PIC_LAPIC,
-       __SIMPLELOCK_UNLOCKED,
-       lapic_hwmask,
-       lapic_hwunmask,
-       lapic_setup,
-       lapic_setup,
+       .pic_dev = {
+               .dv_xname = "lapic",
+       },
+       .pic_type = PIC_LAPIC,
+       .pic_lock = __SIMPLELOCK_UNLOCKED,
+       .pic_hwmask = lapic_hwmask,
+       .pic_hwunmask = lapic_hwunmask,
+       .pic_delroute =lapic_setup,
+       .pic_delroute = lapic_setup,
 };
 
 static void



Home | Main Index | Thread Index | Old Index