Module Name:    src
Committed By:   macallan
Date:           Wed Sep 27 22:11:31 UTC 2017

Modified Files:
        src/sys/arch/macppc/dev: deq.c

Log Message:
identify as 'Audio Codec' and print out which codec we found


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/macppc/dev/deq.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/arch/macppc/dev/deq.c
diff -u src/sys/arch/macppc/dev/deq.c:1.10 src/sys/arch/macppc/dev/deq.c:1.11
--- src/sys/arch/macppc/dev/deq.c:1.10	Fri Sep 22 03:10:46 2017
+++ src/sys/arch/macppc/dev/deq.c	Wed Sep 27 22:11:31 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: deq.c,v 1.10 2017/09/22 03:10:46 macallan Exp $	*/
+/*	$NetBSD: deq.c,v 1.11 2017/09/27 22:11:31 macallan Exp $	*/
 
 /*-
  * Copyright (C) 2005 Michael Lorenz
@@ -32,7 +32,7 @@
  */
  
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: deq.c,v 1.10 2017/09/22 03:10:46 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: deq.c,v 1.11 2017/09/27 22:11:31 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -82,11 +82,15 @@ deq_attach(device_t parent, device_t sel
 {
 	struct deq_softc *sc = device_private(self);
 	struct i2c_attach_args *ia = aux;
+	char name[256];
 
 	sc->sc_dev = self;
 	sc->sc_node = ia->ia_cookie;
 	sc->sc_parent = parent;
 	sc->sc_address = (ia->ia_addr & 0x7f);
 	sc->sc_i2c = ia->ia_tag;
-	aprint_normal(" Apple Digital Equalizer\n");
+	if (OF_getprop(sc->sc_node, "compatible", name, 256) <= 0) {
+		strcpy(name, "unknown");
+	}
+	aprint_normal(" Audio Codec (%s)\n", name);
 }

Reply via email to