lkml.org 
[lkml]   [2000]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] cmpci.c: get rid of check_region
Hi,

Please apply.

- Arnaldo

--- linux-2.4.0-test9-7/drivers/sound/cmpci.c Mon Sep 25 23:31:31 2000
+++ linux-2.4.0-test9-7.acme/drivers/sound/cmpci.c Tue Sep 26 21:54:13 2000
@@ -2370,28 +2370,25 @@
continue;
s->irq = pcidev->irq;

- if (check_region(s->iobase, CM_EXTENT_CODEC)) {
+ if (!request_region(s->iobase, CM_EXTENT_CODEC, "cmpci")) {
printk(KERN_ERR "cmpci: io ports %#x-%#x in use\n", s->iobase, s->iobase+CM_EXTENT_CODEC-1);
goto err_region5;
}
- request_region(s->iobase, CM_EXTENT_CODEC, "cmpci");
- if (check_region(s->iomidi, CM_EXTENT_MIDI)) {
+ if (!request_region(s->iomidi, CM_EXTENT_MIDI, "cmpci Midi")) {
printk(KERN_WARNING "cmpci: io ports %#x-%#x in use, midi disabled.\n", s->iomidi, s->iomidi+CM_EXTENT_MIDI-1);
s->iomidi = 0;
}
else
{
- request_region(s->iomidi, CM_EXTENT_MIDI, "cmpci Midi");
/* set IO based at 0x330 */
outb(inb(s->iobase + CODEC_CMI_LEGACY_CTRL + 3) & ~0x60, s->iobase + CODEC_CMI_LEGACY_CTRL + 3);
}
- if (check_region(s->iosynth, CM_EXTENT_SYNTH)) {
+ if (!request_region(s->iosynth, CM_EXTENT_SYNTH, "cmpci FM")) {
printk(KERN_WARNING "cmpci: io ports %#x-%#x in use, synth disabled.\n", s->iosynth, s->iosynth+CM_EXTENT_SYNTH-1);
s->iosynth = 0;
}
else
{
- request_region(s->iosynth, CM_EXTENT_SYNTH, "cmpci FM");
/* enable FM */
outb(inb(s->iobase + CODEC_CMI_MISC_CTRL + 2) | 8, s->iobase + CODEC_CMI_MISC_CTRL);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.047 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site