Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/macppc/dev identify as 'Audio Codec' and print out ...



details:   https://anonhg.NetBSD.org/src/rev/e9c858979954
branches:  trunk
changeset: 826760:e9c858979954
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Sep 27 22:11:31 2017 +0000

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

diffstat:

 sys/arch/macppc/dev/deq.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 5e1a3edea5eb -r e9c858979954 sys/arch/macppc/dev/deq.c
--- a/sys/arch/macppc/dev/deq.c Wed Sep 27 22:10:19 2017 +0000
+++ b/sys/arch/macppc/dev/deq.c Wed Sep 27 22:11:31 2017 +0000
@@ -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 @@
 {
        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);
 }



Home | Main Index | Thread Index | Old Index