Commit 6187ff39 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] region handling cleanup

Done by William Stinson.
Adds error handling to request_region() calls,
and converts some old check_region() calls too.
parent ebfdbb01
...@@ -364,6 +364,11 @@ static void __init ps2esdi_geninit(void) ...@@ -364,6 +364,11 @@ static void __init ps2esdi_geninit(void)
else else
io_base = PRIMARY_IO_BASE; io_base = PRIMARY_IO_BASE;
if (!request_region(io_base, 4, "ed")) {
printk(KERN_WARNING"Unable to request region 0x%x\n", io_base);
free_irq(PS2ESDI_IRQ, &ps2esdi_gendisk);
return;
}
/* get the dma arbitration level */ /* get the dma arbitration level */
dma_arb_level = (status >> 2) & 0xf; dma_arb_level = (status >> 2) & 0xf;
...@@ -413,7 +418,7 @@ static void __init ps2esdi_geninit(void) ...@@ -413,7 +418,7 @@ static void __init ps2esdi_geninit(void)
ps2esdi_gendisk.nr_real = ps2esdi_drives; ps2esdi_gendisk.nr_real = ps2esdi_drives;
request_dma(dma_arb_level, "ed"); request_dma(dma_arb_level, "ed");
request_region(io_base, 4, "ed");
blk_queue_max_sectors(BLK_DEFAULT_QUEUE(MAJOR_NR), 128); blk_queue_max_sectors(BLK_DEFAULT_QUEUE(MAJOR_NR), 128);
for (i = 0; i < ps2esdi_drives; i++) { for (i = 0; i < ps2esdi_drives; i++) {
......
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