Skip to contentSkip to conversation

drivers/scsi/g_NCR5380.c: check_*_region -> request_*_region (241p9)

PATCH In review Rasmus Andersen 1 participant 2 messages Jan 22, 2001 – Jan 23, 2001

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/scsi/g_NCR5380.c: check_*_region -> request_*_region (241p9)

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?

drivers/scsi/g_NCR5380.c +3 -8
@@ -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)
Signature · 9 lines
Regards,
        Rasmus([email protected])

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 [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#1 lore raw

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

drivers/scsi/g_NCR5380.c +3 -8
@@ -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)
Signature · 9 lines
Regards,
        Rasmus([email protected])

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 [email protected]
Please read the FAQ at http://www.tux.org/lkml/