linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: netdev@vger.kernel.org, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org
Cc: jmalinen@atheros.com, lrodriguez@atheros.com,
	vasanth@atheros.com, senthilkumar@atheros.com
Subject: [PATCH] ath9k: use pci_dev->subsystem_device
Date: Fri, 22 Jul 2011 19:58:23 +0400	[thread overview]
Message-ID: <201107221958.23408.sshtylyov@ru.mvista.com> (raw)

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>

---
The patch is against the recent Linus' tree.

 drivers/net/wireless/ath/ath9k/pci.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/net/wireless/ath/ath9k/pci.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/ath/ath9k/pci.c
+++ linux-2.6/drivers/net/wireless/ath/ath9k/pci.c
@@ -129,7 +129,6 @@ static int ath_pci_probe(struct pci_dev 
 	struct ath_softc *sc;
 	struct ieee80211_hw *hw;
 	u8 csz;
-	u16 subsysid;
 	u32 val;
 	int ret = 0;
 	char hw_name[64];
@@ -223,8 +222,8 @@ static int ath_pci_probe(struct pci_dev 
 
 	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;

             reply	other threads:[~2011-07-22 16:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-22 15:58 Sergei Shtylyov [this message]
2011-07-23  7:53 ` [ath9k-devel] [PATCH] ath9k: use pci_dev->subsystem_device Pavel Roskin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201107221958.23408.sshtylyov@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=jmalinen@atheros.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lrodriguez@atheros.com \
    --cc=netdev@vger.kernel.org \
    --cc=senthilkumar@atheros.com \
    --cc=vasanth@atheros.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).