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/wireless | |
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/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 166e9f742596..f4cd9370e7fa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -898,13 +898,11 @@ static void iwl3945_nic_config(struct iwl_priv *priv) | |||
898 | { | 898 | { |
899 | struct iwl3945_eeprom *eeprom = (struct iwl3945_eeprom *)priv->eeprom; | 899 | struct iwl3945_eeprom *eeprom = (struct iwl3945_eeprom *)priv->eeprom; |
900 | unsigned long flags; | 900 | unsigned long flags; |
901 | u8 rev_id = 0; | 901 | u8 rev_id = priv->pci_dev->revision; |
902 | 902 | ||
903 | spin_lock_irqsave(&priv->lock, flags); | 903 | spin_lock_irqsave(&priv->lock, flags); |
904 | 904 | ||
905 | /* Determine HW type */ | 905 | /* Determine HW type */ |
906 | pci_read_config_byte(priv->pci_dev, PCI_REVISION_ID, &rev_id); | ||
907 | |||
908 | IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n", rev_id); | 906 | IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n", rev_id); |
909 | 907 | ||
910 | if (rev_id & PCI_CFG_REV_ID_BIT_RTP) | 908 | if (rev_id & PCI_CFG_REV_ID_BIT_RTP) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index abd0461bd307..8025c62d4d0c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -4056,7 +4056,7 @@ static void iwl_hw_detect(struct iwl_priv *priv) | |||
4056 | { | 4056 | { |
4057 | priv->hw_rev = _iwl_read32(priv, CSR_HW_REV); | 4057 | priv->hw_rev = _iwl_read32(priv, CSR_HW_REV); |
4058 | priv->hw_wa_rev = _iwl_read32(priv, CSR_HW_REV_WA_REG); | 4058 | priv->hw_wa_rev = _iwl_read32(priv, CSR_HW_REV_WA_REG); |
4059 | pci_read_config_byte(priv->pci_dev, PCI_REVISION_ID, &priv->rev_id); | 4059 | priv->rev_id = priv->pci_dev->revision; |
4060 | IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n", priv->rev_id); | 4060 | IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n", priv->rev_id); |
4061 | } | 4061 | } |
4062 | 4062 | ||
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 1f18bf7df741..9cd7703c2a30 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -1477,13 +1477,11 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, | |||
1477 | struct pci_dev *bridge_pdev = pdev->bus->self; | 1477 | struct pci_dev *bridge_pdev = pdev->bus->self; |
1478 | u16 venderid; | 1478 | u16 venderid; |
1479 | u16 deviceid; | 1479 | u16 deviceid; |
1480 | u8 revisionid; | ||
1481 | u16 irqline; | 1480 | u16 irqline; |
1482 | u8 tmp; | 1481 | u8 tmp; |
1483 | 1482 | ||
1484 | venderid = pdev->vendor; | 1483 | venderid = pdev->vendor; |
1485 | deviceid = pdev->device; | 1484 | deviceid = pdev->device; |
1486 | pci_read_config_byte(pdev, 0x8, &revisionid); | ||
1487 | pci_read_config_word(pdev, 0x3C, &irqline); | 1485 | pci_read_config_word(pdev, 0x3C, &irqline); |
1488 | 1486 | ||
1489 | if (deviceid == RTL_PCI_8192_DID || | 1487 | if (deviceid == RTL_PCI_8192_DID || |
@@ -1494,7 +1492,7 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, | |||
1494 | deviceid == RTL_PCI_8173_DID || | 1492 | deviceid == RTL_PCI_8173_DID || |
1495 | deviceid == RTL_PCI_8172_DID || | 1493 | deviceid == RTL_PCI_8172_DID || |
1496 | deviceid == RTL_PCI_8171_DID) { | 1494 | deviceid == RTL_PCI_8171_DID) { |
1497 | switch (revisionid) { | 1495 | switch (pdev->revision) { |
1498 | case RTL_PCI_REVISION_ID_8192PCIE: | 1496 | case RTL_PCI_REVISION_ID_8192PCIE: |
1499 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, | 1497 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, |
1500 | ("8192 PCI-E is found - " | 1498 | ("8192 PCI-E is found - " |