linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/scsi/g_NCR5380.c: check_*_region -> request_*_region (241p9)
@ 2001-01-22 23:40 Rasmus Andersen
  2001-01-23 22:11 ` Rasmus Andersen
  0 siblings, 1 reply; 2+ messages in thread
From: Rasmus Andersen @ 2001-01-22 23:40 UTC (permalink / raw)
  To: linux-kernel, linux-scsi; +Cc: linux-kernel, linux-scsi

Hi.

(I have not been able to find a maintainer for this code.)

The following patch makes drivers/scsi/g_NCR5380.c check the
return code of request_region instead of using check_region.
Ditto for request_mem_region.

It applies cleanly against ac10 and 241p9.

Comments?


--- linux-ac10-clean/drivers/scsi/g_NCR5380.c	Sat Jan 20 15:17:13 2001
+++ linux-ac10/drivers/scsi/g_NCR5380.c	Mon Jan 22 22:49:41 2001
@@ -361,7 +361,7 @@
 	        }
 	    else
 	        for(i=0; ports[i]; i++) {
-	            if ((!check_region(ports[i], 16)) && (inb(ports[i]) == 0xff))
+			if ((inb(ports[i]) == 0xff) && request_region(ports[i], NCR5380_region_size))
 	                break;
 		}
 	    if (ports[i]) {
@@ -379,15 +379,10 @@
 	    } else
 	        continue;
 	}
-
-	request_region(overrides[current_override].NCR5380_map_name,
-					NCR5380_region_size, "ncr5380");
 #else
-	if(check_mem_region(overrides[current_override].NCR5380_map_name,
-		NCR5380_region_size))
+	if(!request_mem_region(overrides[current_override].NCR5380_map_name,
+		NCR5380_region_size, "ncr5380"))
 		continue;
-	request_mem_region(overrides[current_override].NCR5380_map_name,
-					NCR5380_region_size, "ncr5380");
 #endif
 	instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
 	if(instance == NULL)

-- 
Regards,
        Rasmus(rasmus@jaquet.dk)

Half this game is ninety percent mental.
-Philadelphia Phillies manager Danny Ozark
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: [PATCH] drivers/scsi/g_NCR5380.c: check_*_region -> request_*_region (241p9)
  2001-01-22 23:40 [PATCH] drivers/scsi/g_NCR5380.c: check_*_region -> request_*_region (241p9) Rasmus Andersen
@ 2001-01-23 22:11 ` Rasmus Andersen
  0 siblings, 0 replies; 2+ messages in thread
From: Rasmus Andersen @ 2001-01-23 22:11 UTC (permalink / raw)
  To: linux-kernel, linux-scsi

On Tue, Jan 23, 2001 at 12:40:26AM +0100, Rasmus Andersen wrote:

(This is another updated patch with the comments from the earlier mail
still valid.)


--- linux-ac10-clean/drivers/scsi/g_NCR5380.c	Sat Jan 20 15:17:13 2001
+++ linux-ac10/drivers/scsi/g_NCR5380.c	Tue Jan 23 21:05:44 2001
@@ -361,7 +361,7 @@
 	        }
 	    else
 	        for(i=0; ports[i]; i++) {
-	            if ((!check_region(ports[i], 16)) && (inb(ports[i]) == 0xff))
+			if ((inb(ports[i]) == 0xff) && request_region(ports[i], NCR5380_region_size, "ncr5380"))
 	                break;
 		}
 	    if (ports[i]) {
@@ -379,15 +379,10 @@
 	    } else
 	        continue;
 	}
-
-	request_region(overrides[current_override].NCR5380_map_name,
-					NCR5380_region_size, "ncr5380");
 #else
-	if(check_mem_region(overrides[current_override].NCR5380_map_name,
-		NCR5380_region_size))
+	if(!request_mem_region(overrides[current_override].NCR5380_map_name,
+		NCR5380_region_size, "ncr5380"))
 		continue;
-	request_mem_region(overrides[current_override].NCR5380_map_name,
-					NCR5380_region_size, "ncr5380");
 #endif
 	instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
 	if(instance == NULL)

-- 
Regards,
        Rasmus(rasmus@jaquet.dk)

That lowdown scoundrel deserves to be kicked to death by a jackass, and
I'm just the one to do it. -A congressional candidate in Texas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2001-01-23 22:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-22 23:40 [PATCH] drivers/scsi/g_NCR5380.c: check_*_region -> request_*_region (241p9) Rasmus Andersen
2001-01-23 22:11 ` Rasmus Andersen

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).