linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.5.68] Convert sbc_gxx to remove check_region().
@ 2003-05-02 20:43 Bob Miller
  0 siblings, 0 replies; only message in thread
From: Bob Miller @ 2003-05-02 20:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: trivial

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/sbc_gxx.c b/drivers/mtd/maps/sbc_gxx.c
--- a/drivers/mtd/maps/sbc_gxx.c	Fri May  2 09:52:22 2003
+++ b/drivers/mtd/maps/sbc_gxx.c	Fri May  2 09:52:22 2003
@@ -240,7 +240,7 @@
 
 int __init init_sbc_gxx(void)
 {
-	if (check_region(PAGE_IO,PAGE_IO_SIZE) != 0) {
+	if (!request_region(PAGE_IO,PAGE_IO_SIZE,"SBC-GXx flash")) {
 		printk( KERN_ERR"%s: IO ports 0x%x-0x%x in use\n",
 			sbc_gxx_map.name,
 			PAGE_IO, PAGE_IO+PAGE_IO_SIZE-1 );
@@ -250,10 +250,9 @@
 	if (!iomapadr) {
 		printk( KERN_ERR"%s: failed to ioremap memory region\n",
 			sbc_gxx_map.name );
+		release_region(PAGE_IO,PAGE_IO_SIZE);
 		return -EIO;
 	}
-	
-	request_region( PAGE_IO, PAGE_IO_SIZE, "SBC-GXx flash" );
 	
 	printk( KERN_INFO"%s: IO:0x%x-0x%x MEM:0x%x-0x%x\n",
 		sbc_gxx_map.name,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-02 20:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-02 20:43 [PATCH 2.5.68] Convert sbc_gxx to remove check_region() Bob Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).