Module Name:    src
Committed By:   thorpej
Date:           Sat May  8 11:34:38 UTC 2021

Modified Files:
        src/sys/dev/i2c [thorpej-i2c-spi-conf]: i2c.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.78.2.1 -r1.78.2.2 src/sys/dev/i2c/i2c.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/dev/i2c/i2c.c
diff -u src/sys/dev/i2c/i2c.c:1.78.2.1 src/sys/dev/i2c/i2c.c:1.78.2.2
--- src/sys/dev/i2c/i2c.c:1.78.2.1	Sun Apr 25 21:45:15 2021
+++ src/sys/dev/i2c/i2c.c	Sat May  8 11:34:38 2021
@@ -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);

Reply via email to