From 164ef53fb31d0f195942a7482acd1b6490e5d9ff Mon Sep 17 00:00:00 2001 From: andvar Date: Fri, 8 Sep 2023 22:51:54 +0000 Subject: [PATCH] hp300/dcm(4): set dsp value after sc is initialized. fixes DCMSTATS enabled build for hp300. --- sys/arch/hp300/dev/dcm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/arch/hp300/dev/dcm.c b/sys/arch/hp300/dev/dcm.c index 36c7def35c13..1ac9137a0089 100644 --- a/sys/arch/hp300/dev/dcm.c +++ b/sys/arch/hp300/dev/dcm.c @@ -1,4 +1,4 @@ -/* $NetBSD: dcm.c,v 1.92 2023/04/21 23:01:59 tsutsui Exp $ */ +/* $NetBSD: dcm.c,v 1.93 2023/09/08 22:51:54 andvar Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dcm.c,v 1.92 2023/04/21 23:01:59 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dcm.c,v 1.93 2023/09/08 22:51:54 andvar Exp $"); #include "opt_kgdb.h" @@ -1162,7 +1162,7 @@ dcmstart(struct tty *tp) char buf[16]; int s; #ifdef DCMSTATS - struct dcmstats *dsp = &sc->sc_stats; + struct dcmstats *dsp; int tch = 0; #endif @@ -1172,6 +1172,9 @@ dcmstart(struct tty *tp) sc = device_lookup_private(&dcm_cd, board); dcm = sc->sc_dcm; +#ifdef DCMSTATS + dsp = &sc->sc_stats; +#endif s = spltty(); #ifdef DCMSTATS