]> git.hungrycats.org Git - linux/commitdiff
[janitor] update the comx-hw-comx wan driver to remove call to check_region and check...
authorWilliam Stinson <wstinson@infonie.fr>
Fri, 14 Jun 2002 15:24:41 +0000 (11:24 -0400)
committerJeff Garzik <jgarzik@mandrakesoft.com>
Fri, 14 Jun 2002 15:24:41 +0000 (11:24 -0400)
request_region instead.

I don't have this hardware so compilation checked only.

drivers/net/wan/comx-hw-comx.c

index 4b82a160f8692681b3dd32c667d73f6ababbb0a0..dedb2245d19c685490da6d4a59018ea8ae73467c 100644 (file)
@@ -466,16 +466,16 @@ static int COMX_open(struct net_device *dev)
        }
 
        if (!twin_open) {
-               if (check_region(dev->base_addr, hw->io_extent)) {
+               if (!request_region(dev->base_addr, hw->io_extent, dev->name)) {
                        return -EAGAIN;
                }
                if (request_irq(dev->irq, COMX_interrupt, 0, dev->name, 
                   (void *)dev)) {
                        printk(KERN_ERR "comx-hw-comx: unable to obtain irq %d\n", dev->irq);
+                       release_region(dev->base_addr, hw->io_extent);
                        return -EAGAIN;
                }
                ch->init_status |= IRQ_ALLOCATED;
-               request_region(dev->base_addr, hw->io_extent, dev->name);
                if (!ch->HW_load_board || ch->HW_load_board(dev)) {
                        ch->init_status &= ~IRQ_ALLOCATED;
                        retval=-ENODEV;