diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2011-05-10 01:07:31 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2011-05-10 01:07:31 -0400 |
commit | ec03d6777a9e2b76917ef6d3fc8a01e174bcb9b1 (patch) | |
tree | 3740ca28203029eb173bc65ba67859183255241d /drivers/infiniband | |
parent | 9f5754e34bf964a41e821b2e0b358bc7c314ca4e (diff) |
IB/ipath: Use pci_dev->revision, again
Commit 44c10138fd4b ("PCI: Change all drivers to use pci_device->revision")
already converted this driver to using the revision field of struct
pci_dev but commit bb9171448deb ("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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_driver.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index 58c0e417bc30..be24ac726114 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
@@ -398,7 +398,6 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, | |||
398 | struct ipath_devdata *dd; | 398 | struct ipath_devdata *dd; |
399 | unsigned long long addr; | 399 | unsigned long long addr; |
400 | u32 bar0 = 0, bar1 = 0; | 400 | u32 bar0 = 0, bar1 = 0; |
401 | u8 rev; | ||
402 | 401 | ||
403 | dd = ipath_alloc_devdata(pdev); | 402 | dd = ipath_alloc_devdata(pdev); |
404 | if (IS_ERR(dd)) { | 403 | if (IS_ERR(dd)) { |
@@ -540,13 +539,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, | |||
540 | goto bail_regions; | 539 | goto bail_regions; |
541 | } | 540 | } |
542 | 541 | ||
543 | ret = pci_read_config_byte(pdev, PCI_REVISION_ID, &rev); | 542 | dd->ipath_pcirev = pdev->revision; |
544 | if (ret) { | ||
545 | ipath_dev_err(dd, "Failed to read PCI revision ID unit " | ||
546 | "%u: err %d\n", dd->ipath_unit, -ret); | ||
547 | goto bail_regions; /* shouldn't ever happen */ | ||
548 | } | ||
549 | dd->ipath_pcirev = rev; | ||
550 | 543 | ||
551 | #if defined(__powerpc__) | 544 | #if defined(__powerpc__) |
552 | /* There isn't a generic way to specify writethrough mappings */ | 545 | /* There isn't a generic way to specify writethrough mappings */ |