diff options
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> | 2005-04-25 22:46:30 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-05-20 13:53:36 -0400 |
commit | 23a2bc2289ad3bbc41093c2b50a9c17b37b4d73d (patch) | |
tree | f3a62efa60a14eee710142cc97ed7ec6ae5b3787 /drivers/scsi/dpt_i2o.c | |
parent | 4833869e6e6c2315e301c256e393dfb949c10076 (diff) |
[SCSI] drivers/scsi/dpt_i2o.c: cleanup useless code
This patch removes the array 'hbas' as it seems to be useless
and redundant with the linked list hbas_chain.
Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/dpt_i2o.c')
-rw-r--r-- | drivers/scsi/dpt_i2o.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 53c9b93013f1..973f97dd474c 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -113,7 +113,6 @@ static struct i2o_sys_tbl *sys_tbl = NULL; | |||
113 | static int sys_tbl_ind = 0; | 113 | static int sys_tbl_ind = 0; |
114 | static int sys_tbl_len = 0; | 114 | static int sys_tbl_len = 0; |
115 | 115 | ||
116 | static adpt_hba* hbas[DPTI_MAX_HBA]; | ||
117 | static adpt_hba* hba_chain = NULL; | 116 | static adpt_hba* hba_chain = NULL; |
118 | static int hba_count = 0; | 117 | static int hba_count = 0; |
119 | 118 | ||
@@ -875,7 +874,6 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev | |||
875 | void __iomem *msg_addr_virt = NULL; | 874 | void __iomem *msg_addr_virt = NULL; |
876 | 875 | ||
877 | int raptorFlag = FALSE; | 876 | int raptorFlag = FALSE; |
878 | int i; | ||
879 | 877 | ||
880 | if(pci_enable_device(pDev)) { | 878 | if(pci_enable_device(pDev)) { |
881 | return -EINVAL; | 879 | return -EINVAL; |
@@ -935,12 +933,6 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev | |||
935 | memset(pHba, 0, sizeof(adpt_hba)); | 933 | memset(pHba, 0, sizeof(adpt_hba)); |
936 | 934 | ||
937 | down(&adpt_configuration_lock); | 935 | down(&adpt_configuration_lock); |
938 | for(i=0;i<DPTI_MAX_HBA;i++) { | ||
939 | if(hbas[i]==NULL) { | ||
940 | hbas[i]=pHba; | ||
941 | break; | ||
942 | } | ||
943 | } | ||
944 | 936 | ||
945 | if(hba_chain != NULL){ | 937 | if(hba_chain != NULL){ |
946 | for(p = hba_chain; p->next; p = p->next); | 938 | for(p = hba_chain; p->next; p = p->next); |
@@ -950,7 +942,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev | |||
950 | } | 942 | } |
951 | pHba->next = NULL; | 943 | pHba->next = NULL; |
952 | pHba->unit = hba_count; | 944 | pHba->unit = hba_count; |
953 | sprintf(pHba->name, "dpti%d", i); | 945 | sprintf(pHba->name, "dpti%d", hba_count); |
954 | hba_count++; | 946 | hba_count++; |
955 | 947 | ||
956 | up(&adpt_configuration_lock); | 948 | up(&adpt_configuration_lock); |
@@ -1015,11 +1007,6 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba) | |||
1015 | if(pHba->host){ | 1007 | if(pHba->host){ |
1016 | free_irq(pHba->host->irq, pHba); | 1008 | free_irq(pHba->host->irq, pHba); |
1017 | } | 1009 | } |
1018 | for(i=0;i<DPTI_MAX_HBA;i++) { | ||
1019 | if(hbas[i]==pHba) { | ||
1020 | hbas[i] = NULL; | ||
1021 | } | ||
1022 | } | ||
1023 | p2 = NULL; | 1010 | p2 = NULL; |
1024 | for( p1 = hba_chain; p1; p2 = p1,p1=p1->next){ | 1011 | for( p1 = hba_chain; p1; p2 = p1,p1=p1->next){ |
1025 | if(p1 == pHba) { | 1012 | if(p1 == pHba) { |
@@ -1076,12 +1063,7 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba) | |||
1076 | 1063 | ||
1077 | static int adpt_init(void) | 1064 | static int adpt_init(void) |
1078 | { | 1065 | { |
1079 | int i; | ||
1080 | |||
1081 | printk("Loading Adaptec I2O RAID: Version " DPT_I2O_VERSION "\n"); | 1066 | printk("Loading Adaptec I2O RAID: Version " DPT_I2O_VERSION "\n"); |
1082 | for (i = 0; i < DPTI_MAX_HBA; i++) { | ||
1083 | hbas[i] = NULL; | ||
1084 | } | ||
1085 | #ifdef REBOOT_NOTIFIER | 1067 | #ifdef REBOOT_NOTIFIER |
1086 | register_reboot_notifier(&adpt_reboot_notifier); | 1068 | register_reboot_notifier(&adpt_reboot_notifier); |
1087 | #endif | 1069 | #endif |