Commit a48fa850 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] remove check_region from drivers_atm_ambassador.c

From:  william stinson <wstinson@wanadoo.fr>

  this proposed patch for drivers/atm/ambassador.c atm driver for Linux
  removes one call to check_region using request_region instead

  I don't have this hardware so patch is not tested.  This patch removes
  all references to check_region in this driver.

  This is patch number 30 in a series of check_region patches I am doing as
   part of the kernel janitors project.
parent 393e70b3
......@@ -2439,7 +2439,7 @@ static int __init amb_probe (void) {
" IO %x, IRQ %u, MEM %p", iobase, irq, membase);
// check IO region
if (check_region (iobase, AMB_EXTENT)) {
if (!request_region (iobase, AMB_EXTENT, DEV_LABEL)) {
PRINTK (KERN_ERR, "IO range already in use!");
return;
}
......@@ -2448,6 +2448,7 @@ static int __init amb_probe (void) {
if (!dev) {
// perhaps we should be nice: deregister all adapters and abort?
PRINTK (KERN_ERR, "out of memory!");
release_region (iobase, AMB_EXTENT);
return;
}
......@@ -2465,9 +2466,6 @@ static int __init amb_probe (void) {
// free_irq is at "endif"
} else {
// reserve IO region
request_region (iobase, AMB_EXTENT, DEV_LABEL);
dev->atm_dev = atm_dev_register (DEV_LABEL, &amb_ops, -1, NULL);
if (!dev->atm_dev) {
PRINTD (DBG_ERR, "failed to register Madge ATM adapter");
......@@ -2499,14 +2497,14 @@ static int __init amb_probe (void) {
atm_dev_deregister (dev->atm_dev);
} /* atm_dev_register */
release_region (iobase, AMB_EXTENT);
free_irq (irq, dev);
} /* request_region, request_irq */
} /* request_irq */
amb_reset (dev, 0);
} /* amb_init */
kfree (dev);
release_region (iobase, AMB_EXTENT);
} /* kmalloc, end-of-fn */
PRINTD (DBG_FLOW, "amb_probe");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment