Module Name: src Committed By: andvar Date: Sun Sep 10 15:03:56 UTC 2023
Modified Files: src/sys/arch/hpcmips/dev: plumvideo.c Log Message: Remove custom DPRINTF/DPRINTFN definitions and reuse one defined in debug.h. Remove "#undef PLUMVIDEODEBUG", it is not defined by default. fixes PLUMVIDEODEBUG enabled build. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/hpcmips/dev/plumvideo.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/hpcmips/dev/plumvideo.c diff -u src/sys/arch/hpcmips/dev/plumvideo.c:1.44 src/sys/arch/hpcmips/dev/plumvideo.c:1.45 --- src/sys/arch/hpcmips/dev/plumvideo.c:1.44 Sat Apr 16 17:35:57 2022 +++ src/sys/arch/hpcmips/dev/plumvideo.c Sun Sep 10 15:03:56 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: plumvideo.c,v 1.44 2022/04/16 17:35:57 andvar Exp $ */ +/* $NetBSD: plumvideo.c,v 1.45 2023/09/10 15:03:56 andvar Exp $ */ /*- * Copyright (c) 1999-2002 The NetBSD Foundation, Inc. @@ -30,9 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: plumvideo.c,v 1.44 2022/04/16 17:35:57 andvar Exp $"); - -#undef PLUMVIDEODEBUG +__KERNEL_RCSID(0, "$NetBSD: plumvideo.c,v 1.45 2023/09/10 15:03:56 andvar Exp $"); #include "plumohci.h" /* Plum2 OHCI shared memory allocated on V-RAM */ #include "bivideo.h" @@ -73,13 +71,10 @@ __KERNEL_RCSID(0, "$NetBSD: plumvideo.c, #endif #ifdef PLUMVIDEODEBUG -int plumvideo_debug = 1; -#define DPRINTF(arg) if (plumvideo_debug) printf arg; -#define DPRINTFN(n, arg) if (plumvideo_debug > (n)) printf arg; -#else -#define DPRINTF(arg) -#define DPRINTFN(n, arg) +#define DPRINTF_ENABLE +#define DPRINTF_DEBUG plumvideo_debug #endif +#include <machine/debug.h> struct plumvideo_softc { device_t sc_dev; @@ -766,14 +761,14 @@ plumvideo_power(void *ctx, int type, lon if (!sc->sc_console) return (0); /* serial console */ - DPRINTF(("%s: ON\n", device_xname(sc->sc_dev))); + DPRINTF("%s: ON\n", device_xname(sc->sc_dev)); /* power on */ plumvideo_backlight(sc, 1); break; case PWR_SUSPEND: /* FALLTHROUGH */ case PWR_STANDBY: - DPRINTF(("%s: OFF\n", device_xname(sc->sc_dev))); + DPRINTF("%s: OFF\n", device_xname(sc->sc_dev)); /* power off */ plumvideo_backlight(sc, 0); break;