Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Add the port number to the device properties to ...



details:   https://anonhg.NetBSD.org/src/rev/e1b2467a6ac9
branches:  trunk
changeset: 341502:e1b2467a6ac9
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sun Nov 08 21:05:01 2015 +0000

description:
Add the port number to the device properties to make it easier to relate
a specific ucom instance with the physical port of multi-port devices
like the FTDI 4232.

diffstat:

 sys/dev/usb/ucom.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 1f6ec863b2ed -r e1b2467a6ac9 sys/dev/usb/ucom.c
--- a/sys/dev/usb/ucom.c        Sun Nov 08 21:03:16 2015 +0000
+++ b/sys/dev/usb/ucom.c        Sun Nov 08 21:05:01 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ucom.c,v 1.109 2015/04/13 16:33:25 riastradh Exp $     */
+/*     $NetBSD: ucom.c,v 1.110 2015/11/08 21:05:01 joerg Exp $ */
 
 /*
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.109 2015/04/13 16:33:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.110 2015/11/08 21:05:01 joerg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -219,6 +219,8 @@
                aprint_normal(": %s", uca->info);
        aprint_normal("\n");
 
+       prop_dictionary_set_int32(device_properties(self), "port", uca->portno);
+
        sc->sc_dev = self;
        sc->sc_udev = uca->device;
        sc->sc_iface = uca->iface;



Home | Main Index | Thread Index | Old Index