Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Use correct integer lengths for properties.



details:   https://anonhg.NetBSD.org/src/rev/38bcdcfeb13e
branches:  trunk
changeset: 1021670:38bcdcfeb13e
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun Jun 13 08:50:33 2021 +0000

description:
Use correct integer lengths for properties.
Change property names vendor -> vendor-id, product -> product-id to match other users.

diffstat:

 sys/dev/usb/usb_subr.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (45 lines):

diff -r c1f6c906eee9 -r 38bcdcfeb13e sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c    Sun Jun 13 08:48:29 2021 +0000
+++ b/sys/dev/usb/usb_subr.c    Sun Jun 13 08:50:33 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb_subr.c,v 1.262 2021/06/13 08:48:29 mlelstv Exp $   */
+/*     $NetBSD: usb_subr.c,v 1.263 2021/06/13 08:50:33 mlelstv Exp $   */
 /*     $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $   */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.262 2021/06/13 08:48:29 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.263 2021/06/13 08:50:33 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -421,7 +421,7 @@
 static void
 usbd_iface_fini(struct usbd_device *dev, int ifaceidx)
 {
-       struct usbd_interface *ifc __diagused = &dev->ud_ifaces[ifaceidx];
+       struct usbd_interface *ifc = &dev->ud_ifaces[ifaceidx] __diagused;
 
        KASSERT(ifc->ui_dev == dev);
        KASSERT(ifc->ui_idesc == NULL);
@@ -1067,12 +1067,12 @@
        vendor = UGETW(dd->idVendor);
        product = UGETW(dd->idProduct);
 
-       prop_dictionary_set_uint16(dict, "class", class);
-       prop_dictionary_set_uint16(dict, "subclass", subclass);
+       prop_dictionary_set_uint8(dict, "class", class);
+       prop_dictionary_set_uint8(dict, "subclass", subclass);
        prop_dictionary_set_uint16(dict, "release", release);
-       prop_dictionary_set_uint16(dict, "proto", proto);
-       prop_dictionary_set_uint16(dict, "vendor", vendor);
-       prop_dictionary_set_uint16(dict, "product", product);
+       prop_dictionary_set_uint8(dict, "proto", proto);
+       prop_dictionary_set_uint16(dict, "vendor-id", vendor);
+       prop_dictionary_set_uint16(dict, "product-id", product);
 
        if (dev->ud_vendor) {
                prop_dictionary_set_string(dict,



Home | Main Index | Thread Index | Old Index