diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2011-07-12 10:59:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-12 10:59:38 -0400 |
commit | b691347a92e12e0bf19fe500eb23cf0363f2ecd5 (patch) | |
tree | 48a7381ba0dea3f9cf6a0e3b12310908f01a56d9 /drivers/atm/lanai.c | |
parent | bd0d7aa6b20a9e78def76a0ba8c414daf253c295 (diff) |
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>
Diffstat (limited to 'drivers/atm/lanai.c')
-rw-r--r-- | drivers/atm/lanai.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index 4e8ba56f75d3..e828c5487493 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c | |||
@@ -1947,7 +1947,6 @@ static int __devinit lanai_pci_start(struct lanai_dev *lanai) | |||
1947 | { | 1947 | { |
1948 | struct pci_dev *pci = lanai->pci; | 1948 | struct pci_dev *pci = lanai->pci; |
1949 | int result; | 1949 | int result; |
1950 | u16 w; | ||
1951 | 1950 | ||
1952 | if (pci_enable_device(pci) != 0) { | 1951 | if (pci_enable_device(pci) != 0) { |
1953 | printk(KERN_ERR DEV_LABEL "(itf %d): can't enable " | 1952 | printk(KERN_ERR DEV_LABEL "(itf %d): can't enable " |
@@ -1965,13 +1964,7 @@ static int __devinit lanai_pci_start(struct lanai_dev *lanai) | |||
1965 | "(itf %d): No suitable DMA available.\n", lanai->number); | 1964 | "(itf %d): No suitable DMA available.\n", lanai->number); |
1966 | return -EBUSY; | 1965 | return -EBUSY; |
1967 | } | 1966 | } |
1968 | result = pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &w); | 1967 | result = check_board_id_and_rev("PCI", pci->subsystem_device, NULL); |
1969 | if (result != PCIBIOS_SUCCESSFUL) { | ||
1970 | printk(KERN_ERR DEV_LABEL "(itf %d): can't read " | ||
1971 | "PCI_SUBSYSTEM_ID: %d\n", lanai->number, result); | ||
1972 | return -EINVAL; | ||
1973 | } | ||
1974 | result = check_board_id_and_rev("PCI", w, NULL); | ||
1975 | if (result != 0) | 1968 | if (result != 0) |
1976 | return result; | 1969 | return result; |
1977 | /* Set latency timer to zero as per lanai docs */ | 1970 | /* Set latency timer to zero as per lanai docs */ |