Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 17477 - Driver for maestro sound chip causes errors during compile of kernel
Driver for maestro sound chip causes errors during compile of kernel
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Michael K. Johnson
Depends On:
  Show dependency treegraph
Reported: 2000-09-13 15:34 EDT by John C. Norton
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-12-14 20:46:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John C. Norton 2000-09-13 15:34:07 EDT
When recompiling the 6.2 kernel:

    % cd /usr/src/linux
    % make xconfig
    % make dep
    % make clean
    % make bzImage

the maestro sound chip driver (maestro.c) causes the build to break with the following error & warning messages:

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce 
-m486 -malign-loops=0 -malign-jumps=0 -malign-functions=0 -DCPU=686   -c -o maestro.o maestro.c
maestro.c: In function `ess_open_mixdev':
maestro.c:2106: `MOD_INC_USE_COUNT' undeclared (first use in this function)
maestro.c:2106: (Each undeclared identifier is reported only once
maestro.c:2106: for each function it appears in.)
maestro.c: In function `ess_release_mixdev':
maestro.c:2116: `MOD_DEC_USE_COUNT' undeclared (first use in this function)
maestro.c: In function `ess_open':
maestro.c:3003: `MOD_INC_USE_COUNT' undeclared (first use in this function)
maestro.c: In function `ess_release':
maestro.c:3034: `MOD_DEC_USE_COUNT' undeclared (first use in this function)
maestro.c: At top level:
maestro.c:3479: warning: return-type defaults to `int'
Comment 1 John C. Norton 2000-09-14 12:48:17 EDT
Actually, I think I now know the fix for this.  After more investigation, I found that the MOD_INC_USE_COUNT and MOD_DEC_USE_COUNT were
simply macros which are defined in /usr/src/linux/linux/module.h, for use with modules (but NOT when the maestro driver is built into the kernel).

So I think the appropriate fix is simply to wrap each occurrence of MOD_INC_USE_COUNT and MOD_USE_DEC_COUNT with #ifdef statments
in /usr/src/linux/drivers/sound/maestro.c, that is:

    #ifdef MODULE
    #endif  /* MODULE */

When I made these changes and recompiled the kernel, I got the sound support I needed.

John C. Norton

Comment 2 Alan Cox 2000-09-15 13:12:27 EDT
Thanks. I believe the current 2.2. development code is correct on this one
already. Your fix
is quite sane
Comment 3 Alan Cox 2002-12-14 20:46:50 EST
Forgot to close it way back when

Note You need to log in before you can comment on or make changes to this bug.