Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=57fedc7ae5f712c9c24f5baf30a0fbf38c1bda20
Commit:     57fedc7ae5f712c9c24f5baf30a0fbf38c1bda20
Parent:     c148b9d555decb77bba08fbcf2493ed427918c4e
Author:     Jiri Slaby <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 03:06:28 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Oct 18 14:37:27 2007 -0700

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 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 919fb9b..ffcd8b4 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)
        int fast_clock = 0;
        int altChanRingIndicator = 0;
        int ports_per_aiop = 8;
-       int ret;
-       unsigned int class_rev;
        WordIO_t ConfigIO = 0;
        ByteIO_t UPCIRingInd = 0;
 
@@ -1882,12 +1880,6 @@ static __init int register_PCI(int i, struct pci_dev 
*dev)
                return 0;
 
        rcktpt_io_addr[i] = pci_resource_start(dev, 0);
-       ret = pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
-
-       if (ret) {
-               printk(KERN_INFO "  Error during register_PCI(), unable to read 
config dword \n");
-               return 0;
-       }
 
        rcktpt_type[i] = ROCKET_TYPE_NORMAL;
        rocketModel[i].loadrm2 = 0;
@@ -2041,8 +2033,9 @@ static __init int register_PCI(int i, struct pci_dev *dev)
                ports_per_aiop = 6;
                str = "6-port";
 
-               /*  If class_rev is 1, the rocketmodem flash must be loaded.  
If it is 2 it is a "socketed" version. */
-               if ((class_rev & 0xFF) == 1) {
+               /*  If revision is 1, the rocketmodem flash must be loaded.
+                *  If it is 2 it is a "socketed" version. */
+               if (dev->revision == 1) {
                        rcktpt_type[i] = ROCKET_TYPE_MODEMII;
                        rocketModel[i].loadrm2 = 1;
                } else {
@@ -2057,7 +2050,7 @@ static __init int register_PCI(int i, struct pci_dev *dev)
                max_num_aiops = 1;
                ports_per_aiop = 4;
                str = "4-port";
-               if ((class_rev & 0xFF) == 1) {
+               if (dev->revision == 1) {
                        rcktpt_type[i] = ROCKET_TYPE_MODEMII;
                        rocketModel[i].loadrm2 = 1;
                } else {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to