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 use opt_psoc.h, suppress some debug outp...



details:   https://anonhg.NetBSD.org/src/rev/1956db0867d8
branches:  trunk
changeset: 984021:1956db0867d8
user:      macallan <macallan%NetBSD.org@localhost>
date:      Fri Jun 18 22:57:18 2021 +0000

description:
use opt_psoc.h, suppress some debug output in !PSOC_DEBUG

diffstat:

 sys/arch/macppc/dev/psoc.c |  15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r 22a6a7872153 -r 1956db0867d8 sys/arch/macppc/dev/psoc.c
--- a/sys/arch/macppc/dev/psoc.c        Fri Jun 18 22:52:04 2021 +0000
+++ b/sys/arch/macppc/dev/psoc.c        Fri Jun 18 22:57:18 2021 +0000
@@ -1,4 +1,4 @@
- /* $NetBSD: psoc.c,v 1.6 2021/01/27 02:17:28 thorpej Exp $ */
+ /* $NetBSD: psoc.c,v 1.7 2021/06/18 22:57:18 macallan Exp $ */
 
 /*-
  * Copyright (c) 2019 Michael Lorenz
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: psoc.c,v 1.6 2021/01/27 02:17:28 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: psoc.c,v 1.7 2021/06/18 22:57:18 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -57,6 +57,13 @@
 
 #include <dev/sysmon/sysmonvar.h>
 
+#include "opt_psoc.h"
+#ifdef PSOC_DEBUG
+#define DPRINTF printf
+#else
+#define DPRINTF if (0) printf
+#endif
+
 struct psoc_softc {
        device_t        sc_dev;
        i2c_tag_t       sc_i2c;
@@ -117,10 +124,10 @@
 
        error = OF_package_to_path(sc->sc_node, path, 256);
        path[error] = 0;
-       printf("path [%s]\n", path);
+       DPRINTF("path [%s]\n", path);
        ih = OF_open("fan");
        OF_call_method_1("fan-init", ih, 0);
-       printf("ih %08x\n", ih);
+       DPRINTF("ih %08x\n", ih);
 
        sc->sc_sme = sysmon_envsys_create();
        sc->sc_sme->sme_name = device_xname(self);



Home | Main Index | Thread Index | Old Index