Module Name:    src
Committed By:   skrll
Date:           Wed Dec  3 13:09:00 UTC 2014

Modified Files:
        src/sys/arch/mips/adm5120/dev [nick-nhusb]: ahci.c
        src/sys/dev/ic [nick-nhusb]: sl811hs.c
        src/sys/dev/usb [nick-nhusb]: ehci.c ohci.c uhci.c xhci.c

Log Message:
Use designated initialisers for usb_device_descriptor_t structs.


To generate a diff of this commit:
cvs rdiff -u -r1.12.6.5 -r1.12.6.6 src/sys/arch/mips/adm5120/dev/ahci.c
cvs rdiff -u -r1.47.6.4 -r1.47.6.5 src/sys/dev/ic/sl811hs.c
cvs rdiff -u -r1.234.2.8 -r1.234.2.9 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.254.2.7 -r1.254.2.8 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.264.4.7 -r1.264.4.8 src/sys/dev/usb/uhci.c
cvs rdiff -u -r1.28.2.5 -r1.28.2.6 src/sys/dev/usb/xhci.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/arch/mips/adm5120/dev/ahci.c
diff -u src/sys/arch/mips/adm5120/dev/ahci.c:1.12.6.5 src/sys/arch/mips/adm5120/dev/ahci.c:1.12.6.6
--- src/sys/arch/mips/adm5120/dev/ahci.c:1.12.6.5	Wed Dec  3 12:52:05 2014
+++ src/sys/arch/mips/adm5120/dev/ahci.c	Wed Dec  3 13:08:59 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahci.c,v 1.12.6.5 2014/12/03 12:52:05 skrll Exp $	*/
+/*	$NetBSD: ahci.c,v 1.12.6.6 2014/12/03 13:08:59 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.12.6.5 2014/12/03 12:52:05 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.12.6.6 2014/12/03 13:08:59 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -532,21 +532,23 @@ ahci_noop(usbd_pipe_handle pipe)
  * Data structures and routines to emulate the root hub.
  */
 usb_device_descriptor_t ahci_devd = {
-	USB_DEVICE_DESCRIPTOR_SIZE,
-	UDESC_DEVICE,		/* type */
-	{0x01, 0x01},			/* USB version */
-	UDCLASS_HUB,		/* class */
-	UDSUBCLASS_HUB,		/* subclass */
-	0,			/* protocol */
-	64,			/* max packet */
-	{USB_VENDOR_SCANLOGIC & 0xff,	/* vendor ID (low)  */
-	 USB_VENDOR_SCANLOGIC >> 8  },	/* vendor ID (high) */
-	{0} /* ? */,		/* product ID */
-	{0},			/* device */
-	1,			/* index to manufacturer */
-	2,			/* index to product */
-	0,			/* index to serial number */
-	1			/* number of configurations */
+	.bLength = USB_DEVICE_DESCRIPTOR_SIZE,
+	.bDescriptorType = UDESC_DEVICE,
+	.bcdUSB = {0x01, 0x01},
+	.bDeviceClass = UDCLASS_HUB,
+	.bDeviceSubClass = UDSUBCLASS_HUB,
+	.bDeviceProtocol = 0,
+	.bMaxPacketSize = 64,
+	.idVendor = {
+		USB_VENDOR_SCANLOGIC & 0xff,	/* vendor ID (low)  */
+		USB_VENDOR_SCANLOGIC >> 8
+	},
+	.idProduct = {0},
+	.bcdDevice = {0},
+	.iManufacturer = 1,
+	.iProduct = 2,
+	.iSerialNumber = 0,
+	.bNumConfigurations = 1
 };
 
 usb_config_descriptor_t ahci_confd = {

Index: src/sys/dev/ic/sl811hs.c
diff -u src/sys/dev/ic/sl811hs.c:1.47.6.4 src/sys/dev/ic/sl811hs.c:1.47.6.5
--- src/sys/dev/ic/sl811hs.c:1.47.6.4	Wed Dec  3 12:52:06 2014
+++ src/sys/dev/ic/sl811hs.c	Wed Dec  3 13:09:00 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sl811hs.c,v 1.47.6.4 2014/12/03 12:52:06 skrll Exp $	*/
+/*	$NetBSD: sl811hs.c,v 1.47.6.5 2014/12/03 13:09:00 skrll Exp $	*/
 
 /*
  * Not (c) 2007 Matthew Orgass
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.47.6.4 2014/12/03 12:52:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.47.6.5 2014/12/03 13:09:00 skrll Exp $");
 
 #include "opt_slhci.h"
 
@@ -2930,21 +2930,23 @@ slhci_insert(struct slhci_softc *sc)
  * Data structures and routines to emulate the root hub.
  */
 static const usb_device_descriptor_t slhci_devd = {
-	USB_DEVICE_DESCRIPTOR_SIZE,
-	UDESC_DEVICE,		/* type */
-	{0x01, 0x01},		/* USB version */
-	UDCLASS_HUB,		/* class */
-	UDSUBCLASS_HUB,		/* subclass */
-	0,			/* protocol */
-	64,			/* max packet */
-	{USB_VENDOR_SCANLOGIC & 0xff,	/* vendor ID (low)  */
-	 USB_VENDOR_SCANLOGIC >> 8  },	/* vendor ID (high) */
-	{0} /* ? */,		/* product ID */
-	{0},			/* device */
-	1,			/* index to manufacturer */
-	2,			/* index to product */
-	0,			/* index to serial number */
-	1			/* number of configurations */
+	.bLength = USB_DEVICE_DESCRIPTOR_SIZE,
+	.bDescriptorType = UDESC_DEVICE,
+	.bcdUSB = {0x01, 0x01},
+	.bDeviceClass = UDCLASS_HUB,
+	.bDeviceSubClass = UDSUBCLASS_HUB,
+	.bDeviceProtocol = 0,
+	.bMaxPacketSize = 64,
+	.idVendor = {
+		USB_VENDOR_SCANLOGIC & 0xff,	/* vendor ID (low)  */
+	 	USB_VENDOR_SCANLOGIC >> 8
+	},
+	.idProduct = {0},
+	.bcdDevice = {0},
+	.iManufacturer = 1,
+	.iProduct = 2,
+	.iSerialNumber = 0,
+	.bNumConfigurations = 1
 };
 
 static const struct slhci_confd_t {

Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.234.2.8 src/sys/dev/usb/ehci.c:1.234.2.9
--- src/sys/dev/usb/ehci.c:1.234.2.8	Wed Dec  3 12:52:07 2014
+++ src/sys/dev/usb/ehci.c	Wed Dec  3 13:09:00 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.234.2.8 2014/12/03 12:52:07 skrll Exp $ */
+/*	$NetBSD: ehci.c,v 1.234.2.9 2014/12/03 13:09:00 skrll Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.8 2014/12/03 12:52:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.9 2014/12/03 13:09:00 skrll Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -2255,16 +2255,20 @@ ehci_rem_free_sitd_chain(ehci_softc_t *s
  * Data structures and routines to emulate the root hub.
  */
 Static usb_device_descriptor_t ehci_devd = {
-	USB_DEVICE_DESCRIPTOR_SIZE,
-	UDESC_DEVICE,		/* type */
-	{0x00, 0x02},		/* USB version */
-	UDCLASS_HUB,		/* class */
-	UDSUBCLASS_HUB,		/* subclass */
-	UDPROTO_HSHUBSTT,	/* protocol */
-	64,			/* max packet */
-	{0},{0},{0x00,0x01},	/* device id */
-	1,2,0,			/* string indicies */
-	1			/* # of configurations */
+	.bLength = USB_DEVICE_DESCRIPTOR_SIZE,
+	.bDescriptorType = UDESC_DEVICE,
+	.bcdUSB = {0x00, 0x02},
+	.bDeviceClass = UDCLASS_HUB,
+	.bDeviceSubClass = UDSUBCLASS_HUB,
+	.bDeviceProtocol = UDPROTO_HSHUBSTT,
+	.bMaxPacketSize = 64,
+	.idVendor = {0},
+	.idProduct = {0},
+	.bcdDevice = {0x00,0x01},
+	.iManufacturer = 1,
+	.iProduct = 2,
+	.iSerialNumber = 0,
+	.bNumConfigurations = 1
 };
 
 Static const usb_device_qualifier_t ehci_odevd = {

Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.7 src/sys/dev/usb/ohci.c:1.254.2.8
--- src/sys/dev/usb/ohci.c:1.254.2.7	Wed Dec  3 12:52:07 2014
+++ src/sys/dev/usb/ohci.c	Wed Dec  3 13:09:00 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.254.2.7 2014/12/03 12:52:07 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.254.2.8 2014/12/03 13:09:00 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.7 2014/12/03 12:52:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.8 2014/12/03 13:09:00 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -2395,16 +2395,20 @@ done:
  * Data structures and routines to emulate the root hub.
  */
 Static usb_device_descriptor_t ohci_devd = {
-	USB_DEVICE_DESCRIPTOR_SIZE,
-	UDESC_DEVICE,		/* type */
-	{0x00, 0x01},		/* USB version */
-	UDCLASS_HUB,		/* class */
-	UDSUBCLASS_HUB,		/* subclass */
-	UDPROTO_FSHUB,		/* protocol */
-	64,			/* max packet */
-	{0},{0},{0x00,0x01},	/* device id */
-	1,2,0,			/* string indicies */
-	1			/* # of configurations */
+	.bLength = USB_DEVICE_DESCRIPTOR_SIZE,
+	.bDescriptorType = UDESC_DEVICE,
+	.bcdUSB = {0x00, 0x01},
+	.bDeviceClass = UDCLASS_HUB,
+	.bDeviceSubClass = UDSUBCLASS_HUB,
+	.bDeviceProtocol = UDPROTO_FSHUB,
+	.bMaxPacketSize = 64,
+	.idVendor = {0},
+	.idProduct = {0},
+	.bcdDevice = {0x00,0x01},
+	.iManufacturer = 1,
+	.iProduct = 2,
+	.iSerialNumber = 0,
+	.bNumConfigurations = 1
 };
 
 Static const usb_config_descriptor_t ohci_confd = {

Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.7 src/sys/dev/usb/uhci.c:1.264.4.8
--- src/sys/dev/usb/uhci.c:1.264.4.7	Wed Dec  3 12:52:07 2014
+++ src/sys/dev/usb/uhci.c	Wed Dec  3 13:09:00 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.264.4.7 2014/12/03 12:52:07 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.264.4.8 2014/12/03 13:09:00 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.7 2014/12/03 12:52:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.8 2014/12/03 13:09:00 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -3327,16 +3327,20 @@ uhci_open(usbd_pipe_handle pipe)
  * Data structures and routines to emulate the root hub.
  */
 usb_device_descriptor_t uhci_devd = {
-	USB_DEVICE_DESCRIPTOR_SIZE,
-	UDESC_DEVICE,		/* type */
-	{0x00, 0x01},		/* USB version */
-	UDCLASS_HUB,		/* class */
-	UDSUBCLASS_HUB,		/* subclass */
-	UDPROTO_FSHUB,		/* protocol */
-	64,			/* max packet */
-	{0},{0},{0x00,0x01},	/* device id */
-	1,2,0,			/* string indicies */
-	1			/* # of configurations */
+	.bLength = USB_DEVICE_DESCRIPTOR_SIZE,
+	.bDescriptorType = UDESC_DEVICE,
+	.bcdUSB = {0x00, 0x01},
+	.bDeviceClass = UDCLASS_HUB,
+	.bDeviceSubClass = UDSUBCLASS_HUB,
+	.bDeviceProtocol = UDPROTO_FSHUB,
+	.bMaxPacketSize = 64,
+	.idVendor = {0},
+	.idProduct = {0},
+	.bcdDevice = {0x00,0x01},
+	.iManufacturer = 1,
+	.iProduct = 2,
+	.iSerialNumber = 0,
+	.bNumConfigurations = 1
 };
 
 const usb_config_descriptor_t uhci_confd = {

Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.28.2.5 src/sys/dev/usb/xhci.c:1.28.2.6
--- src/sys/dev/usb/xhci.c:1.28.2.5	Wed Dec  3 12:52:07 2014
+++ src/sys/dev/usb/xhci.c	Wed Dec  3 13:09:00 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.28.2.5 2014/12/03 12:52:07 skrll Exp $	*/
+/*	$NetBSD: xhci.c,v 1.28.2.6 2014/12/03 13:09:00 skrll Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.5 2014/12/03 12:52:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.6 2014/12/03 13:09:00 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -2001,16 +2001,20 @@ xhci_noop(usbd_pipe_handle pipe)
 /* root hub descriptors */
 
 static const usb_device_descriptor_t xhci_devd = {
-	USB_DEVICE_DESCRIPTOR_SIZE,
-	UDESC_DEVICE,		/* type */
-	{0x00, 0x02},		/* USB version */
-	UDCLASS_HUB,		/* class */
-	UDSUBCLASS_HUB,		/* subclass */
-	UDPROTO_HSHUBSTT,	/* protocol */
-	64,			/* max packet */
-	{0},{0},{0x00,0x01},	/* device id */
-	1,2,0,			/* string indexes */
-	1			/* # of configurations */
+	.bLength = USB_DEVICE_DESCRIPTOR_SIZE,
+	.bDescriptorType = UDESC_DEVICE,
+	.bcdUSB = {0x00, 0x02},
+	.bDeviceClass = UDCLASS_HUB,
+	.bDeviceSubClass = UDSUBCLASS_HUB,
+	.bDeviceProtocol = UDPROTO_HSHUBSTT,
+	.bMaxPacketSize = 64,
+	.idVendor = {0},
+	.idProduct = {0},
+	.bcdDevice = {0x00,0x01},
+	.iManufacturer = 1,
+	.iProduct = 2,
+	.iSerialNumber = 0,
+	.bNumConfigurations = 1
 };
 
 static const usb_device_qualifier_t xhci_odevd = {

Reply via email to