mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-23 17:23:21 +07:00
[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>
This commit is contained in:
parent
119faf90ed
commit
fa14001480
@ -2892,13 +2892,10 @@ void __devinit bttv_idcard(struct bttv *btv)
|
|||||||
{
|
{
|
||||||
unsigned int gpiobits;
|
unsigned int gpiobits;
|
||||||
int i,type;
|
int i,type;
|
||||||
unsigned short tmp;
|
|
||||||
|
|
||||||
/* read PCI subsystem ID */
|
/* read PCI subsystem ID */
|
||||||
pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp);
|
btv->cardid = btv->c.pci->subsystem_device << 16;
|
||||||
btv->cardid = tmp << 16;
|
btv->cardid |= btv->c.pci->subsystem_vendor;
|
||||||
pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
|
|
||||||
btv->cardid |= tmp;
|
|
||||||
|
|
||||||
if (0 != btv->cardid && 0xffffffff != btv->cardid) {
|
if (0 != btv->cardid && 0xffffffff != btv->cardid) {
|
||||||
/* look for the card */
|
/* look for the card */
|
||||||
|
Loading…
Reference in New Issue
Block a user