net: use pci_dev->revision, again
Several more network drivers that read the device's revision ID
from the PCI configuration register were merged after the commit
44c10138fd
(PCI: Change all drivers
to use pci_device->revision), so it's time to do another pass of
conversion to using the 'revision' field of 'struct pci_dev'...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
63d8ea7f93
commit
ff938e43d3
@@ -5158,15 +5158,11 @@ static struct cnic_dev *init_bnx2_cnic(struct net_device *dev)
|
||||
|
||||
dev_hold(dev);
|
||||
pci_dev_get(pdev);
|
||||
if (pdev->device == PCI_DEVICE_ID_NX2_5709 ||
|
||||
pdev->device == PCI_DEVICE_ID_NX2_5709S) {
|
||||
u8 rev;
|
||||
|
||||
pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
|
||||
if (rev < 0x10) {
|
||||
pci_dev_put(pdev);
|
||||
goto cnic_err;
|
||||
}
|
||||
if ((pdev->device == PCI_DEVICE_ID_NX2_5709 ||
|
||||
pdev->device == PCI_DEVICE_ID_NX2_5709S) &&
|
||||
(pdev->revision < 0x10)) {
|
||||
pci_dev_put(pdev);
|
||||
goto cnic_err;
|
||||
}
|
||||
pci_dev_put(pdev);
|
||||
|
||||
|
Reference in New Issue
Block a user