Patch: linux-2.5.2-pre8/drivers/sound compilation fixes: MINOR-->minor

From: Adam J. Richter (
Date: Sat Jan 05 2002 - 06:49:57 EST

        Doing a global replace of "MINOR(" with "minor(" in all
.c files in linux/drivers/sound allows all of the sound drivers
to compile (at least as modules on x86). This reflect the
changes in kdev_t introduced in linux-2.5.2-pre6. You can do this
by applying the following patch *or* by the following shell command
(which is how I did it in the first place):

for file in $(find linux/drivers/sound -name '*.c' | xargs egrep -l 'MINOR\(' ) ; do
ed $file << DONE ; done

        One note about this: this resulted in some drivers that
made the following rather obscure looking declarations:

                int minor = minor(dev);

        Apparently, the variable being declared is not in the scope
of its initialization value. So, the code works, but it's not as
clear as could be. I could rename the effected variables if need
be, although I that is something that individual device driver
maintainers could deal with at "leisure" just as well.

        I have not tested these changes. I only know that they
make the sound drivers compile.

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jan 07 2002 - 21:00:28 EST