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

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

Post by Adam J. Richte » Sun, 06 Jan 2002 21:00:12



        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
%s/MINOR(/minor(/g
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

+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."

  sound.diffs
11K Download
 
 
 

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

Post by Pete Zaitce » Mon, 07 Jan 2002 05:40:06


Quote:>    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).  [...]

You did not change ymfpci, why? Linus fixed it already?

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

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

Post by Adam J. Richte » Mon, 07 Jan 2002 08:50:10



>>        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).  [...]
>You did not change ymfpci, why? Linus fixed it already?

        linux-2.5.2-pre8/drivers/sound/ymfpci.c compiles without
errors or warnings, unmodified.

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104

+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

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. Patch?: linux-2.5.2-pre8/drivers/video kdev_t compilation fixes

        Most (all?) of the frame buffer drivers in
linux-2.5.2-pre8/drivers/video have a kdev_t compilation error,
because they try to set their fb_info->node field to -1 (it is
a kdev_t).  Shortly thereafter, regsiter_framebuffer sets it to
a more useful value.  So far, I have been unable to spot any
code that relies on fb_info->node being initialized to a
particular value prior to the call to register_framebuffer,
although I have not looked very hard.  What I did see was
some "???" comments beside some of the initializations to -1.
I suspsect that this is just useless initialization.

        Anyhow, deleting all of those initializations to -1
allows all of the framebuffer drivers to compile, which is
that this patch does.  I have also included a tiny patch to
a commented out line in include/linux/fb.h, updating it to
use minor() instead of MINOR(), in case it is every uncommented.

        I am still a long way from getting pre8 to run, so I
have not tested change.  Can anyone point out a place in
drivers/framebuffer that relies on fb_info->node being set to -1,
or minor(fb_info->node) being -1?

        By the way, don't worry if a few of the line offsets in this
patch are off.  That's because of some other changes I have in my
drivers/framebuffer (which I have previous posted, specifically
PCI ID tables, fb font modularization with demand loading, and the
fb core as a loadable module).

--
Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104

+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."

  video.diff
21K Download

2. Intel pentium overdrive 83

3. Patch: linux-2.5.2-pre8/drivers/ieee1394 kdev_t compilation fixes

4. Timeout a blocking program

5. Patch: linux-2.5.2-pre8/drivers/mtd compilation fixes

6. Linux on Handheld Computers

7. Patch: linux-2.5.2-pre8/drivers/md partial compilation fixes

8. Default font for Irix Unix Shell

9. linux-2.5.2-pre8/drivers/telephony kdev_t compilation fixes

10. PATCH: linux-2.5.2-pre7/drivers/block/rd.c kdev_t fix

11. Minor fix for driver/serial/core.c

12. 'MINOR' fix in emu10k1 driver

13. 2.5.18 : drivers/pci/pool.c minor printk fix