]> git.hungrycats.org Git - linux/commitdiff
[PATCH] wf_midi check_region() removal
authorAlexander Viro <viro@www.linux.org.uk>
Fri, 27 Aug 2004 12:13:07 +0000 (05:13 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 27 Aug 2004 12:13:07 +0000 (05:13 -0700)
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sound/oss/wf_midi.c

index 379e70f2c9f8546d3aa30d4da0158289680ec8db..3ced960e53d4864f85fc8bc77acd81b520110e5c 100644 (file)
@@ -784,7 +784,7 @@ virtual_midi_disable (void)
 
 int __init detect_wf_mpu (int irq, int io_base)
 {
-       if (check_region (io_base, 2)) {
+       if (!request_region(io_base, 2, "wavefront midi")) {
                printk (KERN_WARNING "WF-MPU: I/O port %x already in use.\n",
                        io_base);
                return -1;
@@ -803,11 +803,10 @@ int __init install_wf_mpu (void)
        if ((phys_dev->devno = sound_alloc_mididev()) < 0){
 
                printk (KERN_ERR "WF-MPU: Too many MIDI devices detected.\n");
+               release_region(phys_dev->base, 2);
                return -1;
-
        }
 
-       request_region (phys_dev->base, 2, "wavefront midi");
        phys_dev->isvirtual = 0;
 
        if (config_wf_mpu (phys_dev)) {