From bb9e5fb3bd12f945d0e119d21495fbee1e81ad1d Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Thu, 26 Jan 2012 21:43:11 +0000 Subject: [PATCH] Minor cleanups to the csa snd driver. Remove unneeded temporary variable (data) to better match the OSS code. Remove some unused constants and type definitions. Tested by: joel Approved by: jhb (mentor) MFC after: 3 weeks --- sys/dev/sound/pci/csa.c | 5 ++--- sys/dev/sound/pci/csareg.h | 20 -------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c index 04ea4ec29bd..a7679936e26 100644 --- a/sys/dev/sound/pci/csa.c +++ b/sys/dev/sound/pci/csa.c @@ -861,7 +861,7 @@ static int csa_downloadimage(csa_res *resp) { int i; - u_int32_t tmp, src, dst, count, data; + u_int32_t tmp, src, dst, count; for (i = 0; i < CLEAR__COUNT; i++) { dst = ClrStat[i].BA1__DestByteOffset; @@ -875,8 +875,7 @@ csa_downloadimage(csa_res *resp) dst = FillStat[i].Offset; count = FillStat[i].Size; for (tmp = 0; tmp < count; tmp += 4) { - data = FillStat[i].pFill[src]; - csa_writemem(resp, dst + tmp, data); + csa_writemem(resp, dst + tmp, FillStat[i].pFill[src]); src++; } } diff --git a/sys/dev/sound/pci/csareg.h b/sys/dev/sound/pci/csareg.h index c6767fbe1d7..54b64e05a66 100644 --- a/sys/dev/sound/pci/csareg.h +++ b/sys/dev/sound/pci/csareg.h @@ -1949,24 +1949,4 @@ #define CS_AC97_POWER_CONTROL_MIXVON_ON 0x0004 #define CS_AC97_POWER_CONTROL_MIXVOFF_ON 0x0008 -/* The following struct holds the initialization array. */ - -/* - * this is 3*1024 for parameter, 3.5*1024 for sample and 2*3.5*1024 for code since - * each instruction is 40 bits and takes two dwords - */ -#define INKY_BA1_DWORD_SIZE (13 * 1024 + 512) -#define INKY_MEMORY_COUNT 3 - -struct BA1struct -{ - struct - { - u_long ulDestByteOffset, - ulSourceByteSize; - } MemoryStat[INKY_MEMORY_COUNT]; - - u_long BA1Array[INKY_BA1_DWORD_SIZE]; -}; - #endif /* _CSA_REG_H */ -- 2.45.2