diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2011-07-22 11:58:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-08 14:29:22 -0400 |
commit | 581c9c4f7113fbb4d28d58ab6b2125e16ce62812 (patch) | |
tree | 751110e04edd017e297e2585716afbf54074a7df | |
parent | 26aaa4a0e923326560286e567b9fbf8429d5ef2b (diff) |
ath9k: use pci_dev->subsystem_device
The driver reads PCI subsystem ID from the PCI configuration register while it's
already stored by the PCI subsystem in the 'subsystem_device' field of 'struct
pci_dev'...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index be4ea1329813..839df305348e 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -156,7 +156,6 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
156 | struct ath_softc *sc; | 156 | struct ath_softc *sc; |
157 | struct ieee80211_hw *hw; | 157 | struct ieee80211_hw *hw; |
158 | u8 csz; | 158 | u8 csz; |
159 | u16 subsysid; | ||
160 | u32 val; | 159 | u32 val; |
161 | int ret = 0; | 160 | int ret = 0; |
162 | char hw_name[64]; | 161 | char hw_name[64]; |
@@ -250,8 +249,8 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
250 | 249 | ||
251 | sc->irq = pdev->irq; | 250 | sc->irq = pdev->irq; |
252 | 251 | ||
253 | pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &subsysid); | 252 | ret = ath9k_init_device(id->device, sc, pdev->subsystem_device, |
254 | ret = ath9k_init_device(id->device, sc, subsysid, &ath_pci_bus_ops); | 253 | &ath_pci_bus_ops); |
255 | if (ret) { | 254 | if (ret) { |
256 | dev_err(&pdev->dev, "Failed to initialize device\n"); | 255 | dev_err(&pdev->dev, "Failed to initialize device\n"); |
257 | goto err_init; | 256 | goto err_init; |