summaryrefslogtreecommitdiff
path: root/sys/arch/zaurus/dev
diff options
context:
space:
mode:
authorChristopher Pascoe <pascoe@cvs.openbsd.org>2005-04-21 13:43:49 +0000
committerChristopher Pascoe <pascoe@cvs.openbsd.org>2005-04-21 13:43:49 +0000
commit8714e259d2328cea7d9cc2ff7faf59992b94c2a8 (patch)
treed6a1bc1e657834e2b6056e176185fa4ced1b7737 /sys/arch/zaurus/dev
parentb89b088d22bc5997203fe237b5a753d87e093901 (diff)
Move i2c open/close from callers into zaudio_standby. Fixes an error path.
Diffstat (limited to 'sys/arch/zaurus/dev')
-rw-r--r--sys/arch/zaurus/dev/zaurus_audio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/zaurus/dev/zaurus_audio.c b/sys/arch/zaurus/dev/zaurus_audio.c
index 03dfc065c51..436435b861f 100644
--- a/sys/arch/zaurus/dev/zaurus_audio.c
+++ b/sys/arch/zaurus/dev/zaurus_audio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_audio.c,v 1.2 2005/04/15 01:17:26 pascoe Exp $ */
+/* $OpenBSD: zaurus_audio.c,v 1.3 2005/04/21 13:43:48 pascoe Exp $ */
/*
* Copyright (c) 2005 Christopher Pascoe <pascoe@openbsd.org>
@@ -272,9 +272,13 @@ zaudio_init(struct zaudio_softc *sc)
void
zaudio_standby(struct zaudio_softc *sc)
{
+ pxa2x0_i2c_open(&sc->sc_i2c);
+
/* Switch codec to standby power only */
wm8750_write(sc, PWRMGMT1_REG, PWRMGMT1_SET_VMIDSEL(2));
wm8750_write(sc, PWRMGMT2_REG, 0);
+
+ pxa2x0_i2c_close(&sc->sc_i2c);
}
void
@@ -599,13 +603,9 @@ zaudio_halt_output(void *hdl)
/* XXX forcibly stop output DMA? */
- pxa2x0_i2c_open(&sc->sc_i2c);
-
zaudio_standby(sc);
sc->sc_playing = 0;
- pxa2x0_i2c_close(&sc->sc_i2c);
-
return 0;
}