aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2011-07-22 14:16:04 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 16:56:04 -0400
commitfa14001480fb264b916ed6406ead24205dc1a86c (patch)
tree8fd159709ee3b77a22b4ca962c3a3dfc3836b557
parent119faf90ed79adfd4a8930f62c3b9592adf5d250 (diff)
[media] bt8xx: use pci_dev->subsystem_{vendor|device}
The driver reads PCI subsystem IDs from the PCI configuration registers while they are already stored by the PCI subsystem in the 'subsystem_{vendor|device}' fields of 'struct pci_dev'... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/bt8xx/bttv-cards.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c
index 3c9e6c7e7b52..5b15f63bf065 100644
--- a/drivers/media/video/bt8xx/bttv-cards.c
+++ b/drivers/media/video/bt8xx/bttv-cards.c
@@ -2892,13 +2892,10 @@ void __devinit bttv_idcard(struct bttv *btv)
2892{ 2892{
2893 unsigned int gpiobits; 2893 unsigned int gpiobits;
2894 int i,type; 2894 int i,type;
2895 unsigned short tmp;
2896 2895
2897 /* read PCI subsystem ID */ 2896 /* read PCI subsystem ID */
2898 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp); 2897 btv->cardid = btv->c.pci->subsystem_device << 16;
2899 btv->cardid = tmp << 16; 2898 btv->cardid |= btv->c.pci->subsystem_vendor;
2900 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
2901 btv->cardid |= tmp;
2902 2899
2903 if (0 != btv->cardid && 0xffffffff != btv->cardid) { 2900 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
2904 /* look for the card */ 2901 /* look for the card */