Skip to content

Commit

Permalink
[SCSI] gdth: update deprecated pci_find_device
Browse files Browse the repository at this point in the history
Fix compilation warning in gdth.c, which was using the deprecated
pci_find_device.

drivers/scsi/gdth.c:645: warning: 'pci_find_device' is deprecated (declared at include/linux/pci.h:495)

Changing it to use pci_get_device, instead.

Signed-off-by: Sergio Luis <sergio@larces.uece.br>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Sergio Luis authored and James Bottomley committed Feb 13, 2008
1 parent 61c9281 commit 9910930
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/scsi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ config SCSI_FD_MCS

config SCSI_GDTH
tristate "Intel/ICP (former GDT SCSI Disk Array) RAID Controller support"
depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API && PCI_LEGACY
depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API
---help---
Formerly called GDT SCSI Disk Array Controller Support.

Expand Down
7 changes: 5 additions & 2 deletions drivers/scsi/gdth.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,12 +642,15 @@ static void __init gdth_search_dev(gdth_pci_str *pcistr, ushort *cnt,
*cnt, vendor, device));

pdev = NULL;
while ((pdev = pci_find_device(vendor, device, pdev))
while ((pdev = pci_get_device(vendor, device, pdev))
!= NULL) {
if (pci_enable_device(pdev))
continue;
if (*cnt >= MAXHA)
if (*cnt >= MAXHA) {
pci_dev_put(pdev);
return;
}

/* GDT PCI controller found, resources are already in pdev */
pcistr[*cnt].pdev = pdev;
pcistr[*cnt].irq = pdev->irq;
Expand Down

0 comments on commit 9910930

Please sign in to comment.