Source-Changes-HG archive

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

[src/thorpej-i2c-spi-conf]: src/sys/dev/i2c iic_print_direct(): In the "not c...



details:   https://anonhg.NetBSD.org/src/rev/8ad82d1b1fe6
branches:  thorpej-i2c-spi-conf
changeset: 378753:8ad82d1b1fe6
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat May 08 11:34:38 2021 +0000

description:
iic_print_direct(): In the "not configured" case, parenthetically print
the first element of the compat list, if we got a compat list.

diffstat:

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

diffs (31 lines):

diff -r fdd4904de4f6 -r 8ad82d1b1fe6 sys/dev/i2c/i2c.c
--- a/sys/dev/i2c/i2c.c Sat May 08 02:44:22 2021 +0000
+++ b/sys/dev/i2c/i2c.c Sat May 08 11:34:38 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i2c.c,v 1.78.2.1 2021/04/25 21:45:15 thorpej Exp $     */
+/*     $NetBSD: i2c.c,v 1.78.2.2 2021/05/08 11:34:38 thorpej Exp $     */
 
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.78.2.1 2021/04/25 21:45:15 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.78.2.2 2021/05/08 11:34:38 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -135,8 +135,11 @@ iic_print_direct(void *aux, const char *
        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_clist ? " (" : "",
+                             ia->ia_clist ? ia->ia_clist : "",
+                             ia->ia_clist ? ")" : "",
                              pnp, ia->ia_addr);
        else
                aprint_normal(" addr 0x%02x", ia->ia_addr);



Home | Main Index | Thread Index | Old Index