IB/ipath: Use pci_dev->revision, again
Commit44c10138fd
("PCI: Change all drivers to use pci_device->revision") already converted this driver to using the revision field of struct pci_dev but commitbb9171448d
("IB/ipath: Misc changes to prepare for IB7220 introduction") later reverted that change for some strange reason. Restore the change. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Acked-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
parent
9f5754e34b
commit
ec03d6777a
@ -398,7 +398,6 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
|
|||||||
struct ipath_devdata *dd;
|
struct ipath_devdata *dd;
|
||||||
unsigned long long addr;
|
unsigned long long addr;
|
||||||
u32 bar0 = 0, bar1 = 0;
|
u32 bar0 = 0, bar1 = 0;
|
||||||
u8 rev;
|
|
||||||
|
|
||||||
dd = ipath_alloc_devdata(pdev);
|
dd = ipath_alloc_devdata(pdev);
|
||||||
if (IS_ERR(dd)) {
|
if (IS_ERR(dd)) {
|
||||||
@ -540,13 +539,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
|
|||||||
goto bail_regions;
|
goto bail_regions;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
|
dd->ipath_pcirev = pdev->revision;
|
||||||
if (ret) {
|
|
||||||
ipath_dev_err(dd, "Failed to read PCI revision ID unit "
|
|
||||||
"%u: err %d\n", dd->ipath_unit, -ret);
|
|
||||||
goto bail_regions; /* shouldn't ever happen */
|
|
||||||
}
|
|
||||||
dd->ipath_pcirev = rev;
|
|
||||||
|
|
||||||
#if defined(__powerpc__)
|
#if defined(__powerpc__)
|
||||||
/* There isn't a generic way to specify writethrough mappings */
|
/* There isn't a generic way to specify writethrough mappings */
|
||||||
|
Loading…
Reference in New Issue
Block a user