public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/cdrom/cdu31c.c check_region() fix
@ 2004-01-02 16:13 Omkhar Arasaratnam
  2004-01-02 19:02 ` viro
  0 siblings, 1 reply; 2+ messages in thread
From: Omkhar Arasaratnam @ 2004-01-02 16:13 UTC (permalink / raw)
  To: emoenke; +Cc: linux-kernel, trivial, randy

Here is a check_region fix for cdu31a

As usual feel free to poke / prod / suggest / include this patch as you see fit


--- linux-clean/drivers/cdrom/cdu31a.c.org	2004-01-02 10:54:01.000000000 -0500
+++ linux-clean/drivers/cdrom/cdu31a.c	2004-01-02 11:03:56.000000000 -0500
@@ -3345,7 +3345,7 @@
 		i = 0;
 		while ((cdu31a_addresses[i].base != 0)
 		       && (!drive_found)) {
-			if (check_region(cdu31a_addresses[i].base, 4)) {
+			if (!request_region(cdu31a_addresses[i].base, 4,"cdu31a")) {
 				i++;
 				continue;
 			}
@@ -3359,6 +3359,7 @@
 				cdu31a_irq = cdu31a_addresses[i].int_num;
 			} else {
 				i++;
+				release_region(cdu31a_address[i].base,4);
 			}
 		}
 	}
@@ -3366,9 +3367,6 @@
 	if (!drive_found)
 		goto errout3;
 
-	if (!request_region(cdu31a_port, 4, "cdu31a"))
-		goto errout3;
-
 	if (register_blkdev(MAJOR_NR, "cdu31a"))
 		goto errout2;

O

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-02 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-02 16:13 [PATCH] drivers/cdrom/cdu31c.c check_region() fix Omkhar Arasaratnam
2004-01-02 19:02 ` viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox