From: Sergei Shtylyov Date: Fri, 22 Jul 2011 15:58:23 +0000 (+0400) Subject: ath9k: use pci_dev->subsystem_device X-Git-Tag: firefly_0821_release~3680^2~4273^2~254^2~399 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=581c9c4f7113fbb4d28d58ab6b2125e16ce62812;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: John W. Linville --- 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) struct ath_softc *sc; struct ieee80211_hw *hw; u8 csz; - u16 subsysid; u32 val; int ret = 0; char hw_name[64]; @@ -250,8 +249,8 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) sc->irq = pdev->irq; - pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &subsysid); - ret = ath9k_init_device(id->device, sc, subsysid, &ath_pci_bus_ops); + ret = ath9k_init_device(id->device, sc, pdev->subsystem_device, + &ath_pci_bus_ops); if (ret) { dev_err(&pdev->dev, "Failed to initialize device\n"); goto err_init;