Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/audio Change two aprint_error_dev() to device_printf...



details:   https://anonhg.NetBSD.org/src/rev/3c70108730c4
branches:  trunk
changeset: 969471:3c70108730c4
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Feb 22 06:36:07 2020 +0000

description:
Change two aprint_error_dev() to device_printf() (and improve messages).
This is also called from other than boot.

diffstat:

 sys/dev/audio/audio.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r 9b7208871b99 -r 3c70108730c4 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c     Sat Feb 22 06:28:10 2020 +0000
+++ b/sys/dev/audio/audio.c     Sat Feb 22 06:36:07 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.45 2020/02/22 06:28:10 isaki Exp $ */
+/*     $NetBSD: audio.c,v 1.46 2020/02/22 06:36:07 isaki Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.45 2020/02/22 06:28:10 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.46 2020/02/22 06:36:07 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -5944,8 +5944,9 @@
                }
                error = audio_mixer_init(sc, AUMODE_PLAY, phwfmt, pfil);
                if (error) {
-                       aprint_error_dev(sc->sc_dev,
-                           "configuring playback mode failed\n");
+                       device_printf(sc->sc_dev,
+                           "configuring playback mode failed with %d\n",
+                           error);
                        kmem_free(sc->sc_pmixer, sizeof(*sc->sc_pmixer));
                        sc->sc_pmixer = NULL;
                        return error;
@@ -5962,8 +5963,9 @@
                }
                error = audio_mixer_init(sc, AUMODE_RECORD, rhwfmt, rfil);
                if (error) {
-                       aprint_error_dev(sc->sc_dev,
-                           "configuring record mode failed\n");
+                       device_printf(sc->sc_dev,
+                           "configuring record mode failed with %d\n",
+                           error);
                        kmem_free(sc->sc_rmixer, sizeof(*sc->sc_rmixer));
                        sc->sc_rmixer = NULL;
                        return error;



Home | Main Index | Thread Index | Old Index