summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-03-19 11:34:23 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-03-19 11:34:23 +0000
commitcde54d41d41ecc698408ab4c1f6c1ed3bdcd939e (patch)
treed9413614165f0ac9fd7494467fa1480622305bc0 /sys/arch/sparc64/dev
parentaead540ed22f539ba3dbfa37327af5dd4c8fe578 (diff)
Reduces the noise around the global ``ticks'' variable by renaming
all the local ones to ``nticks''. ok stefan@, deraadt@
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r--sys/arch/sparc64/dev/beep.c12
-rw-r--r--sys/arch/sparc64/dev/beeper.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/arch/sparc64/dev/beep.c b/sys/arch/sparc64/dev/beep.c
index fa9f7bae4a7..bcb7067e260 100644
--- a/sys/arch/sparc64/dev/beep.c
+++ b/sys/arch/sparc64/dev/beep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: beep.c,v 1.6 2016/01/08 15:54:13 jcs Exp $ */
+/* $OpenBSD: beep.c,v 1.7 2016/03/19 11:34:22 mpi Exp $ */
/*
* Copyright (c) 2006 Jason L. Wright (jason@thought.net)
@@ -219,11 +219,11 @@ void
beep_bell(void *vsc, u_int pitch, u_int period, u_int volume, int poll)
{
struct beep_softc *sc = vsc;
- int s, ticks;
+ int s, nticks;
- ticks = (period * hz) / 1000;
- if (ticks <= 0)
- ticks = 1;
+ nticks = (period * hz) / 1000;
+ if (nticks <= 0)
+ nticks = 1;
s = spltty();
if (sc->sc_bellactive) {
@@ -240,7 +240,7 @@ beep_bell(void *vsc, u_int pitch, u_int period, u_int volume, int poll)
sc->sc_belltimeout = 1;
bus_space_write_1(sc->sc_iot, sc->sc_ioh, BEEP_CTRL,
BEEP_CTRL_ON);
- timeout_add(&sc->sc_to, ticks);
+ timeout_add(&sc->sc_to, nticks);
}
splx(s);
}
diff --git a/sys/arch/sparc64/dev/beeper.c b/sys/arch/sparc64/dev/beeper.c
index 9d7e3900f84..73fd981a336 100644
--- a/sys/arch/sparc64/dev/beeper.c
+++ b/sys/arch/sparc64/dev/beeper.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: beeper.c,v 1.10 2005/12/20 16:50:33 martin Exp $ */
+/* $OpenBSD: beeper.c,v 1.11 2016/03/19 11:34:22 mpi Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -148,11 +148,11 @@ beeper_bell(vsc, pitch, period, volume, poll)
int poll;
{
struct beeper_softc *sc = vsc;
- int s, ticks;
+ int s, nticks;
- ticks = (period * hz) / 1000;
- if (ticks <= 0)
- ticks = 1;
+ nticks = (period * hz) / 1000;
+ if (nticks <= 0)
+ nticks = 1;
s = spltty();
if (sc->sc_bellactive) {
@@ -168,7 +168,7 @@ beeper_bell(vsc, pitch, period, volume, poll)
sc->sc_bellactive = 1;
sc->sc_belltimeout = 1;
bus_space_write_4(sc->sc_iot, sc->sc_ioh, BEEP_REG, 1);
- timeout_add(&sc->sc_to, ticks);
+ timeout_add(&sc->sc_to, nticks);
}
splx(s);
}