Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/i2c If there is a compat string list, parentheticall...



details:   https://anonhg.NetBSD.org/src/rev/0205af51084a
branches:  trunk
changeset: 368636:0205af51084a
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Jul 23 03:05:27 2022 +0000

description:
If there is a compat string list, parenthetically print the first one
in iic_print_direct().  (From thorpej-i2c-spi-conf2 branch.)

diffstat:

 sys/dev/i2c/i2c.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 6695f05563ba -r 0205af51084a sys/dev/i2c/i2c.c
--- a/sys/dev/i2c/i2c.c Fri Jul 22 23:43:23 2022 +0000
+++ b/sys/dev/i2c/i2c.c Sat Jul 23 03:05:27 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i2c.c,v 1.87 2022/06/29 15:33:45 mlelstv Exp $ */
+/*     $NetBSD: i2c.c,v 1.88 2022/07/23 03:05:27 thorpej Exp $ */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -53,7 +53,7 @@
 #endif /* _KERNEL_OPT */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.87 2022/06/29 15:33:45 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.88 2022/07/23 03:05:27 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -129,8 +129,11 @@
        struct i2c_attach_args *ia = aux;
 
        if (pnp != NULL)
-               aprint_normal("%s at %s addr 0x%02x",
+               aprint_normal("%s%s%s%s at %s addr 0x%02x",
                              ia->ia_name ? ia->ia_name : "(unknown)",
+                             ia->ia_ncompat ? " (" : "",
+                             ia->ia_ncompat ? ia->ia_compat[0] : "",
+                             ia->ia_ncompat ? ")" : "",
                              pnp, ia->ia_addr);
        else
                aprint_normal(" addr 0x%02x", ia->ia_addr);



Home | Main Index | Thread Index | Old Index