From 7a44913b3f20ce65b7e41e7991cee92cc9e244c3 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Sat, 2 Jan 2010 04:12:07 +0000 Subject: [PATCH] Fix botches in mechanical changes to make this compile: dbri.c:165: warning: 'dbri_sus' declared 'static' but never defined dbri.c: In function 'dbri_resume': dbri.c:2188: error: 'sc' undeclared dbri.c:2189: error: break statement not within loop or switch --- sys/dev/sbus/dbri.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/sbus/dbri.c b/sys/dev/sbus/dbri.c index 5ad4dd1f2b6d..8d6e9293adef 100644 --- a/sys/dev/sbus/dbri.c +++ b/sys/dev/sbus/dbri.c @@ -1,4 +1,4 @@ -/* $NetBSD: dbri.c,v 1.26 2010/01/02 01:43:42 christos Exp $ */ +/* $NetBSD: dbri.c,v 1.27 2010/01/02 04:12:07 tsutsui Exp $ */ /* * Copyright (C) 1997 Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de) @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dbri.c,v 1.26 2010/01/02 01:43:42 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dbri.c,v 1.27 2010/01/02 04:12:07 tsutsui Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -162,7 +162,6 @@ static void dbri_free(void *, void *, struct malloc_type *); static paddr_t dbri_mappage(void *, void *, off_t, int); static void dbri_set_power(struct dbri_softc *, int); static void dbri_bring_up(struct dbri_softc *); -static void dbri_sus(int, void *); static bool dbri_suspend(device_t PMF_FN_PROTO); static bool dbri_resume(device_t PMF_FN_PROTO); @@ -2185,8 +2184,10 @@ dbri_suspend(device_t self PMF_FN_ARGS) static bool dbri_resume(device_t self PMF_FN_ARGS) { + struct dbri_softc *sc = device_private(self); + if (sc->sc_powerstate != 0) - break; + return true; aprint_verbose("resume: %d\n", sc->sc_refcount); if (sc->sc_playing) { volatile uint32_t *cmd;