diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2011-02-28 14:57:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-28 14:57:33 -0500 |
commit | ff938e43d39e926de74b32a3656c190f979ab642 (patch) | |
tree | b914a3f7cc9923013133462a55f5dbe9e7a7799c /drivers/net/cnic.c | |
parent | 63d8ea7f93e1fb9d1aa9509ab3e1a71199245c80 (diff) |
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
44c10138fd4bbc4b6d6bff0873c24902f2a9da65 (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>
Diffstat (limited to 'drivers/net/cnic.c')
-rw-r--r-- | drivers/net/cnic.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index 2d2d28f58e91..5274de3e1bb9 100644 --- a/drivers/net/cnic.c +++ b/drivers/net/cnic.c | |||
@@ -5158,15 +5158,11 @@ static struct cnic_dev *init_bnx2_cnic(struct net_device *dev) | |||
5158 | 5158 | ||
5159 | dev_hold(dev); | 5159 | dev_hold(dev); |
5160 | pci_dev_get(pdev); | 5160 | pci_dev_get(pdev); |
5161 | if (pdev->device == PCI_DEVICE_ID_NX2_5709 || | 5161 | if ((pdev->device == PCI_DEVICE_ID_NX2_5709 || |
5162 | pdev->device == PCI_DEVICE_ID_NX2_5709S) { | 5162 | pdev->device == PCI_DEVICE_ID_NX2_5709S) && |
5163 | u8 rev; | 5163 | (pdev->revision < 0x10)) { |
5164 | 5164 | pci_dev_put(pdev); | |
5165 | pci_read_config_byte(pdev, PCI_REVISION_ID, &rev); | 5165 | goto cnic_err; |
5166 | if (rev < 0x10) { | ||
5167 | pci_dev_put(pdev); | ||
5168 | goto cnic_err; | ||
5169 | } | ||
5170 | } | 5166 | } |
5171 | pci_dev_put(pdev); | 5167 | pci_dev_put(pdev); |
5172 | 5168 | ||