aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-07-26 11:54:15 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:39:30 -0400
commit59fcf844095a89fe5e42b4e9bfc4b49dd6909e6b (patch)
treef6ff4e0cbfeaef7aac59b9afb6fa18ae3ce07ffd /drivers/scsi
parentecec1947479e52eeb4378cc5706d6d46b0cf5172 (diff)
[SCSI] advansys: delete AscGetChipBusType
By moving a test from AscGetChipBusType into its only caller, we can delete the whole function Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/advansys.c36
1 files changed, 4 insertions, 32 deletions
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index dc9dca37c258..e6619868173f 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -8001,34 +8001,6 @@ AscGetChipVersion(PortAddr iop_base, unsigned short bus_type)
8001 return AscGetChipVerNo(iop_base); 8001 return AscGetChipVerNo(iop_base);
8002} 8002}
8003 8003
8004static ushort __devinit AscGetChipBusType(PortAddr iop_base)
8005{
8006 ushort chip_ver;
8007
8008 chip_ver = AscGetChipVerNo(iop_base);
8009 if ((chip_ver >= ASC_CHIP_MIN_VER_VL)
8010 && (chip_ver <= ASC_CHIP_MAX_VER_VL)
8011 ) {
8012 if (((iop_base & 0x0C30) == 0x0C30)
8013 || ((iop_base & 0x0C50) == 0x0C50)
8014 ) {
8015 return (ASC_IS_EISA);
8016 }
8017 return (ASC_IS_VL);
8018 }
8019 if ((chip_ver >= ASC_CHIP_MIN_VER_ISA) &&
8020 (chip_ver <= ASC_CHIP_MAX_VER_ISA)) {
8021 if (chip_ver >= ASC_CHIP_MIN_VER_ISA_PNP) {
8022 return (ASC_IS_ISAPNP);
8023 }
8024 return (ASC_IS_ISA);
8025 } else if ((chip_ver >= ASC_CHIP_MIN_VER_PCI) &&
8026 (chip_ver <= ASC_CHIP_MAX_VER_PCI)) {
8027 return (ASC_IS_PCI);
8028 }
8029 return (0);
8030}
8031
8032static ASC_DCNT 8004static ASC_DCNT
8033AscLoadMicroCode(PortAddr iop_base, 8005AscLoadMicroCode(PortAddr iop_base,
8034 ushort s_addr, uchar *mcode_buf, ushort mcode_size) 8006 ushort s_addr, uchar *mcode_buf, ushort mcode_size)
@@ -10468,12 +10440,12 @@ static ushort __devinit AscInitAscDvcVar(ASC_DVC_VAR *asc_dvc)
10468 } 10440 }
10469 10441
10470 asc_dvc->cfg->isa_dma_speed = ASC_DEF_ISA_DMA_SPEED; 10442 asc_dvc->cfg->isa_dma_speed = ASC_DEF_ISA_DMA_SPEED;
10471 if (AscGetChipBusType(iop_base) == ASC_IS_ISAPNP) {
10472 AscSetChipIFC(iop_base, IFC_INIT_DEFAULT);
10473 asc_dvc->bus_type = ASC_IS_ISAPNP;
10474 }
10475#ifdef CONFIG_ISA 10443#ifdef CONFIG_ISA
10476 if ((asc_dvc->bus_type & ASC_IS_ISA) != 0) { 10444 if ((asc_dvc->bus_type & ASC_IS_ISA) != 0) {
10445 if (chip_version >= ASC_CHIP_MIN_VER_ISA_PNP) {
10446 AscSetChipIFC(iop_base, IFC_INIT_DEFAULT);
10447 asc_dvc->bus_type = ASC_IS_ISAPNP;
10448 }
10477 asc_dvc->cfg->isa_dma_channel = 10449 asc_dvc->cfg->isa_dma_channel =
10478 (uchar)AscGetIsaDmaChannel(iop_base); 10450 (uchar)AscGetIsaDmaChannel(iop_base);
10479 } 10451 }