aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sound/pci
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-04-08 00:01:29 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2022-04-08 00:01:29 +0000
commit92e7c96648b3d7226be137384710ab4b27a51be9 (patch)
tree2ac843e0e27739e8e821c2fcda093875ced30dbb /sys/dev/sound/pci
parent0025422091dd12123b0720bc6cd71023e03b3036 (diff)
downloadsrc-92e7c96648b3d7226be137384710ab4b27a51be9.tar.gz
src-92e7c96648b3d7226be137384710ab4b27a51be9.zip
pcm envy24: Remove some dead code and associated unused variables.
The dead code was commented out in the initial import and hasn't changed since.
Diffstat (limited to 'sys/dev/sound/pci')
-rw-r--r--sys/dev/sound/pci/envy24.c16
-rw-r--r--sys/dev/sound/pci/envy24ht.c16
2 files changed, 6 insertions, 26 deletions
diff --git a/sys/dev/sound/pci/envy24.c b/sys/dev/sound/pci/envy24.c
index 36f453bd9252..7c1ba58b5708 100644
--- a/sys/dev/sound/pci/envy24.c
+++ b/sys/dev/sound/pci/envy24.c
@@ -1202,9 +1202,9 @@ envy24_gethwptr(struct sc_info *sc, int dir)
static void
envy24_updintr(struct sc_info *sc, int dir)
{
- int regptr, regintr;
+ int regintr;
u_int32_t mask, intr;
- u_int32_t ptr, size, cnt;
+ u_int32_t cnt;
u_int16_t blk;
#if(0)
@@ -1212,28 +1212,18 @@ envy24_updintr(struct sc_info *sc, int dir)
#endif
if (dir == PCMDIR_PLAY) {
blk = sc->blk[0];
- size = sc->psize / 4;
- regptr = ENVY24_MT_PCNT;
regintr = ENVY24_MT_PTERM;
mask = ~ENVY24_MT_INT_PMASK;
}
else {
blk = sc->blk[1];
- size = sc->rsize / 4;
- regptr = ENVY24_MT_RCNT;
regintr = ENVY24_MT_RTERM;
mask = ~ENVY24_MT_INT_RMASK;
}
- ptr = size - envy24_rdmt(sc, regptr, 2) - 1;
- /*
- cnt = blk - ptr % blk - 1;
- if (cnt == 0)
- cnt = blk - 1;
- */
cnt = blk - 1;
#if(0)
- device_printf(sc->dev, "envy24_updintr():ptr = %d, blk = %d, cnt = %d\n", ptr, blk, cnt);
+ device_printf(sc->dev, "envy24_updintr():blk = %d, cnt = %d\n", blk, cnt);
#endif
envy24_wrmt(sc, regintr, cnt, 2);
intr = envy24_rdmt(sc, ENVY24_MT_INT, 1);
diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c
index d794fe605967..608afe33ca9f 100644
--- a/sys/dev/sound/pci/envy24ht.c
+++ b/sys/dev/sound/pci/envy24ht.c
@@ -1156,9 +1156,9 @@ envy24ht_gethwptr(struct sc_info *sc, int dir)
static void
envy24ht_updintr(struct sc_info *sc, int dir)
{
- int regptr, regintr;
+ int regintr;
u_int32_t mask, intr;
- u_int32_t ptr, size, cnt;
+ u_int32_t cnt;
u_int16_t blk;
#if(0)
@@ -1166,28 +1166,18 @@ envy24ht_updintr(struct sc_info *sc, int dir)
#endif
if (dir == PCMDIR_PLAY) {
blk = sc->blk[0];
- size = sc->psize / 4;
- regptr = ENVY24HT_MT_PCNT;
regintr = ENVY24HT_MT_PTERM;
mask = ~ENVY24HT_MT_INT_PMASK;
}
else {
blk = sc->blk[1];
- size = sc->rsize / 4;
- regptr = ENVY24HT_MT_RCNT;
regintr = ENVY24HT_MT_RTERM;
mask = ~ENVY24HT_MT_INT_RMASK;
}
- ptr = size - envy24ht_rdmt(sc, regptr, 2) - 1;
- /*
- cnt = blk - ptr % blk - 1;
- if (cnt == 0)
- cnt = blk - 1;
- */
cnt = blk - 1;
#if(0)
- device_printf(sc->dev, "envy24ht_updintr():ptr = %d, blk = %d, cnt = %d\n", ptr, blk, cnt);
+ device_printf(sc->dev, "envy24ht_updintr():blk = %d, cnt = %d\n", blk, cnt);
#endif
envy24ht_wrmt(sc, regintr, cnt, 2);
intr = envy24ht_rdmt(sc, ENVY24HT_MT_INT_MASK, 1);