Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lanai: use pci_dev->subsystem_device

The driver reads PCI subsystem IDs from the PCI configuration registers while
it is 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: David S. Miller <davem@davemloft.net>

authored by

Sergei Shtylyov and committed by
David S. Miller
b691347a bd0d7aa6

+1 -8
+1 -8
drivers/atm/lanai.c
··· 1947 1947 { 1948 1948 struct pci_dev *pci = lanai->pci; 1949 1949 int result; 1950 - u16 w; 1951 1950 1952 1951 if (pci_enable_device(pci) != 0) { 1953 1952 printk(KERN_ERR DEV_LABEL "(itf %d): can't enable " ··· 1964 1965 "(itf %d): No suitable DMA available.\n", lanai->number); 1965 1966 return -EBUSY; 1966 1967 } 1967 - result = pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &w); 1968 - if (result != PCIBIOS_SUCCESSFUL) { 1969 - printk(KERN_ERR DEV_LABEL "(itf %d): can't read " 1970 - "PCI_SUBSYSTEM_ID: %d\n", lanai->number, result); 1971 - return -EINVAL; 1972 - } 1973 - result = check_board_id_and_rev("PCI", w, NULL); 1968 + result = check_board_id_and_rev("PCI", pci->subsystem_device, NULL); 1974 1969 if (result != 0) 1975 1970 return result; 1976 1971 /* Set latency timer to zero as per lanai docs */