aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx_old.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-09-15 10:34:32 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-09-23 21:32:52 -0400
commita07f353701acae77e023f6270e8af353b37af7c4 (patch)
tree150bb61c6eb1891afaaa79047a399e3e66f561a2 /drivers/scsi/aic7xxx_old.c
parent1a68d41a334a406d4bd35999f0be4d47f193e477 (diff)
[SCSI] Switch some more scsi drivers to pci_get_device and refcounted pci structures
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx_old.c')
-rw-r--r--drivers/scsi/aic7xxx_old.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c
index ba3bccafe113..5dcef48d414f 100644
--- a/drivers/scsi/aic7xxx_old.c
+++ b/drivers/scsi/aic7xxx_old.c
@@ -9194,7 +9194,7 @@ aic7xxx_detect(struct scsi_host_template *template)
9194 for (i = 0; i < ARRAY_SIZE(aic_pdevs); i++) 9194 for (i = 0; i < ARRAY_SIZE(aic_pdevs); i++)
9195 { 9195 {
9196 pdev = NULL; 9196 pdev = NULL;
9197 while ((pdev = pci_find_device(aic_pdevs[i].vendor_id, 9197 while ((pdev = pci_get_device(aic_pdevs[i].vendor_id,
9198 aic_pdevs[i].device_id, 9198 aic_pdevs[i].device_id,
9199 pdev))) { 9199 pdev))) {
9200 if (pci_enable_device(pdev)) 9200 if (pci_enable_device(pdev))
@@ -9651,6 +9651,9 @@ aic7xxx_detect(struct scsi_host_template *template)
9651 */ 9651 */
9652 aic7xxx_configure_bugs(temp_p); 9652 aic7xxx_configure_bugs(temp_p);
9653 9653
9654 /* Hold a pci device reference */
9655 pci_dev_get(temp_p->pdev);
9656
9654 if ( list_p == NULL ) 9657 if ( list_p == NULL )
9655 { 9658 {
9656 list_p = current_p = temp_p; 9659 list_p = current_p = temp_p;
@@ -10987,8 +10990,10 @@ aic7xxx_release(struct Scsi_Host *host)
10987 if(!p->pdev) 10990 if(!p->pdev)
10988 release_region(p->base, MAXREG - MINREG); 10991 release_region(p->base, MAXREG - MINREG);
10989#ifdef CONFIG_PCI 10992#ifdef CONFIG_PCI
10990 else 10993 else {
10991 pci_release_regions(p->pdev); 10994 pci_release_regions(p->pdev);
10995 pci_dev_put(p->pdev);
10996 }
10992#endif 10997#endif
10993 prev = NULL; 10998 prev = NULL;
10994 next = first_aic7xxx; 10999 next = first_aic7xxx;