From d4118817df1c6751d12e932a9c012f1c0b78b75a Mon Sep 17 00:00:00 2001 From: mycroft Date: Sat, 17 Jul 2004 19:47:27 +0000 Subject: [PATCH] Remove sc_open; the audio layer does this. --- sys/dev/pcmcia/esl.c | 15 ++------------- sys/dev/pcmcia/eslvar.h | 3 +-- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/sys/dev/pcmcia/esl.c b/sys/dev/pcmcia/esl.c index 29cc06704a6d..b4e1b3c3370c 100644 --- a/sys/dev/pcmcia/esl.c +++ b/sys/dev/pcmcia/esl.c @@ -1,4 +1,4 @@ -/* $NetBSD: esl.c,v 1.10 2003/05/16 23:55:32 kristerw Exp $ */ +/* $NetBSD: esl.c,v 1.11 2004/07/17 19:47:27 mycroft Exp $ */ /* * Copyright (c) 2001 Jared D. McNeill @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: esl.c,v 1.10 2003/05/16 23:55:32 kristerw Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esl.c,v 1.11 2004/07/17 19:47:27 mycroft Exp $"); #include #include @@ -150,9 +150,6 @@ esl_open(void *hdl, int flags) struct esl_pcmcia_softc *sc = hdl; int i; - if (sc->sc_esl.sc_open != 0) - return (EBUSY); - if ((*sc->sc_enable)(sc)) return (ENXIO); @@ -169,8 +166,6 @@ esl_open(void *hdl, int flags) for (i = 0; i < ESS_MAX_NDEVS; i++) esl_set_gain(sc, i, 1); - sc->sc_esl.sc_open = 1; - /* XXX: Delay a bit */ delay(10000); @@ -187,8 +182,6 @@ esl_close(void *hdl) (*sc->sc_disable)(sc); - sc->sc_esl.sc_open = 0; - return; } @@ -558,8 +551,6 @@ esl_init(struct esl_pcmcia_softc *sc) bus_space_tag_t iot = sc->sc_pcioh.iot; bus_space_handle_t ioh = sc->sc_pcioh.ioh; - sc->sc_esl.sc_open = 0; - /* Initialization sequence */ for (i = 0; ENABLE_ORDER[i] != -1; i++) bus_space_read_1(iot, ioh, ENABLE[i]); @@ -620,8 +611,6 @@ esl_init(struct esl_pcmcia_softc *sc) /* Disable speaker until device is opened */ esl_speaker_off(sc); - sc->sc_esl.sc_open = 0; - return (0); } diff --git a/sys/dev/pcmcia/eslvar.h b/sys/dev/pcmcia/eslvar.h index ad2e90ed3e7d..58b287903d72 100644 --- a/sys/dev/pcmcia/eslvar.h +++ b/sys/dev/pcmcia/eslvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: eslvar.h,v 1.3 2001/12/25 03:46:34 jmcneill Exp $ */ +/* $NetBSD: eslvar.h,v 1.4 2004/07/17 19:47:45 mycroft Exp $ */ /* * Copyright (c) 2001 Jared D. McNeill @@ -55,7 +55,6 @@ struct esl_softc { struct device sc_dev; /* base device */ - u_short sc_open; /* reference count of open calls */ u_char gain[ESS_MAX_NDEVS][2]; /* kept in input levels */ #define ESS_LEFT 0 #define ESS_RIGHT 1