Commit bdf27737 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] remove check_region from drivers_scsi_cpqfcTSinit.c

From:  william stinson <wstinson@wanadoo.fr>

  this proposed patch for drivers/scsi/cpqfcTSinit.c scsi driver for
  Linux removes two calls to check_region using request_region instead

  This is patch number 28 in a series of check_region patches I am doing as
  part of the kernel janitors project.
parent b65a6d5d
...@@ -384,7 +384,8 @@ int cpqfcTS_detect(Scsi_Host_Template *ScsiHostTemplate) ...@@ -384,7 +384,8 @@ int cpqfcTS_detect(Scsi_Host_Template *ScsiHostTemplate)
// Since we have two 256-byte I/O port ranges (upper // Since we have two 256-byte I/O port ranges (upper
// and lower), check them both // and lower), check them both
if( check_region( cpqfcHBAdata->fcChip.Registers.IOBaseU, 0xff) ) if( !request_region( cpqfcHBAdata->fcChip.Registers.IOBaseU,
0xff, DEV_NAME ) )
{ {
printk(" cpqfcTS address in use: %x\n", printk(" cpqfcTS address in use: %x\n",
cpqfcHBAdata->fcChip.Registers.IOBaseU); cpqfcHBAdata->fcChip.Registers.IOBaseU);
...@@ -393,21 +394,21 @@ int cpqfcTS_detect(Scsi_Host_Template *ScsiHostTemplate) ...@@ -393,21 +394,21 @@ int cpqfcTS_detect(Scsi_Host_Template *ScsiHostTemplate)
continue; continue;
} }
if( check_region( cpqfcHBAdata->fcChip.Registers.IOBaseL, 0xff) ) if( !request_region( cpqfcHBAdata->fcChip.Registers.IOBaseL,
0xff, DEV_NAME ) )
{ {
printk(" cpqfcTS address in use: %x\n", printk(" cpqfcTS address in use: %x\n",
cpqfcHBAdata->fcChip.Registers.IOBaseL); cpqfcHBAdata->fcChip.Registers.IOBaseL);
release_region( cpqfcHBAdata->fcChip.Registers.IOBaseU, 0xff );
free_irq( HostAdapter->irq, HostAdapter); free_irq( HostAdapter->irq, HostAdapter);
scsi_unregister( HostAdapter); scsi_unregister( HostAdapter);
continue; continue;
} }
// OK, we should be able to grab everything we need now. // OK, we have grabbed everything we need now.
request_region( cpqfcHBAdata->fcChip.Registers.IOBaseL, 0xff, DEV_NAME); DEBUG_PCI(printk(" Reserved 255 I/O addresses @ %x\n",
request_region( cpqfcHBAdata->fcChip.Registers.IOBaseU, 0xff, DEV_NAME);
DEBUG_PCI(printk(" Requesting 255 I/O addresses @ %x\n",
cpqfcHBAdata->fcChip.Registers.IOBaseL )); cpqfcHBAdata->fcChip.Registers.IOBaseL ));
DEBUG_PCI(printk(" Requesting 255 I/O addresses @ %x\n", DEBUG_PCI(printk(" Reserved 255 I/O addresses @ %x\n",
cpqfcHBAdata->fcChip.Registers.IOBaseU )); cpqfcHBAdata->fcChip.Registers.IOBaseU ));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment