Skip to contentSkip to conversation

drivers/scsi/u14-35f.c: check_region -> request_region (241p9)

PATCH New Rasmus Andersen 1 participant 1 message Jan 23, 2001 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/scsi/u14-35f.c: check_region -> request_region (241p9)

(Too fast again and forgot to cc the lists. If anyone replies to this mail, please cc [email protected]. Thanks.)

----- Forwarded message from Rasmus Andersen <[email protected]> -----

Hi.

The following patch makes drivers/scsi/u14-35f.c drop check_region in favour of checking the return code from request_region. It applies cleanly against ac10 and 241p9.

Comments?

drivers/scsi/u14-34f.c +3 -4
@@ -729,7 +729,9 @@
 
    sprintf(name, "%s%d", driver_name, j);
 
-   if(check_region(port_base, REGION_SIZE)) {
+   /* Register the I/O space that we use */
+   
+   if(!request_region(port_base, REGION_SIZE, driver_name)) {
 #if defined(DEBUG_DETECT)
       printk("%s: address 0x%03lx in use, skipping probe.\n", name, port_base);
 #endif
@@ -804,9 +806,6 @@
 
    /* If BIOS is disabled, force enable interrupts */
    if (sh[j]->base == 0) outb(CMD_ENA_INTR, sh[j]->io_port + REG_SYS_MASK);
-
-   /* Register the I/O space that we use */
-   request_region(sh[j]->io_port, sh[j]->n_io_port, driver_name);
 
    memset(HD(j), 0, sizeof(struct hostdata));
    HD(j)->heads = mapping_table[config_2.mapping_mode].heads;
Signature · 11 lines
Regards,
        Rasmus([email protected])

Good judgement comes from experience. Experience comes from bad judgement. 
  -- Jim Horning 

----- End forwarded message -----
-
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/