lkml.org 
[lkml]   [2003]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2.5.68] Convert octagon-5066 to remove check_region().
Moved the request_region() call to replace check_region() and adds
release_region()'s in the error paths that occure before the old
call to request_region().

--
Bob Miller Email: rem@osdl.org
Open Source Development Lab Phone: 503.626.2455 Ext. 17

diff -Nru a/drivers/mtd/maps/octagon-5066.c b/drivers/mtd/maps/octagon-5066.c
--- a/drivers/mtd/maps/octagon-5066.c Fri May 2 09:52:22 2003
+++ b/drivers/mtd/maps/octagon-5066.c Fri May 2 09:52:22 2003
@@ -231,7 +231,7 @@
int i;

// Do an autoprobe sequence
- if (check_region(PAGE_IO,1) != 0)
+ if (!request_region(PAGE_IO,1,"Octagon SSD"))
{
printk("5066: Page Register in Use\n");
return -EAGAIN;
@@ -239,16 +239,16 @@
iomapadr = (unsigned long)ioremap(WINDOW_START, WINDOW_LENGTH);
if (!iomapadr) {
printk("Failed to ioremap memory region\n");
+ release_region(PAGE_IO,1);
return -EIO;
}
if (OctProbe() != 0)
{
printk("5066: Octagon Probe Failed, is this an Octagon 5066 SBC?\n");
iounmap((void *)iomapadr);
+ release_region(PAGE_IO,1);
return -EAGAIN;
}
-
- request_region(PAGE_IO,1,"Octagon SSD");

// Print out our little header..
printk("Octagon 5066 SSD IO:0x%x MEM:0x%x-0x%x\n",PAGE_IO,WINDOW_START,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site