diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-10-18 06:06:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 17:37:27 -0400 |
commit | 57fedc7ae5f712c9c24f5baf30a0fbf38c1bda20 (patch) | |
tree | 30bff233d9e483de68fda324fd87be2cf773d264 | |
parent | c148b9d555decb77bba08fbcf2493ed427918c4e (diff) |
Char: rocket, remove pci_read_config_dword(CLASS_REVISION)
We may use pdev->revision instead of reading pci config space directly, so
remove pci_read_config_dword invoking.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/char/rocket.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 919fb9b06b84..ffcd8b4fbf99 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c | |||
@@ -1873,8 +1873,6 @@ static __init int register_PCI(int i, struct pci_dev *dev) | |||
1873 | int fast_clock = 0; | 1873 | int fast_clock = 0; |
1874 | int altChanRingIndicator = 0; | 1874 | int altChanRingIndicator = 0; |
1875 | int ports_per_aiop = 8; | 1875 | int ports_per_aiop = 8; |
1876 | int ret; | ||
1877 | unsigned int class_rev; | ||
1878 | WordIO_t ConfigIO = 0; | 1876 | WordIO_t ConfigIO = 0; |
1879 | ByteIO_t UPCIRingInd = 0; | 1877 | ByteIO_t UPCIRingInd = 0; |
1880 | 1878 | ||
@@ -1882,12 +1880,6 @@ static __init int register_PCI(int i, struct pci_dev *dev) | |||
1882 | return 0; | 1880 | return 0; |
1883 | 1881 | ||
1884 | rcktpt_io_addr[i] = pci_resource_start(dev, 0); | 1882 | rcktpt_io_addr[i] = pci_resource_start(dev, 0); |
1885 | ret = pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); | ||
1886 | |||
1887 | if (ret) { | ||
1888 | printk(KERN_INFO " Error during register_PCI(), unable to read config dword \n"); | ||
1889 | return 0; | ||
1890 | } | ||
1891 | 1883 | ||
1892 | rcktpt_type[i] = ROCKET_TYPE_NORMAL; | 1884 | rcktpt_type[i] = ROCKET_TYPE_NORMAL; |
1893 | rocketModel[i].loadrm2 = 0; | 1885 | rocketModel[i].loadrm2 = 0; |
@@ -2041,8 +2033,9 @@ static __init int register_PCI(int i, struct pci_dev *dev) | |||
2041 | ports_per_aiop = 6; | 2033 | ports_per_aiop = 6; |
2042 | str = "6-port"; | 2034 | str = "6-port"; |
2043 | 2035 | ||
2044 | /* If class_rev is 1, the rocketmodem flash must be loaded. If it is 2 it is a "socketed" version. */ | 2036 | /* If revision is 1, the rocketmodem flash must be loaded. |
2045 | if ((class_rev & 0xFF) == 1) { | 2037 | * If it is 2 it is a "socketed" version. */ |
2038 | if (dev->revision == 1) { | ||
2046 | rcktpt_type[i] = ROCKET_TYPE_MODEMII; | 2039 | rcktpt_type[i] = ROCKET_TYPE_MODEMII; |
2047 | rocketModel[i].loadrm2 = 1; | 2040 | rocketModel[i].loadrm2 = 1; |
2048 | } else { | 2041 | } else { |
@@ -2057,7 +2050,7 @@ static __init int register_PCI(int i, struct pci_dev *dev) | |||
2057 | max_num_aiops = 1; | 2050 | max_num_aiops = 1; |
2058 | ports_per_aiop = 4; | 2051 | ports_per_aiop = 4; |
2059 | str = "4-port"; | 2052 | str = "4-port"; |
2060 | if ((class_rev & 0xFF) == 1) { | 2053 | if (dev->revision == 1) { |
2061 | rcktpt_type[i] = ROCKET_TYPE_MODEMII; | 2054 | rcktpt_type[i] = ROCKET_TYPE_MODEMII; |
2062 | rocketModel[i].loadrm2 = 1; | 2055 | rocketModel[i].loadrm2 = 1; |
2063 | } else { | 2056 | } else { |