]> err.no Git - linux-2.6/commitdiff
[CPUFREQ] Optimize gx-suspmod revision ID fetching
authorJean Delvare <khali@linux-fr.org>
Thu, 9 Nov 2006 17:29:35 +0000 (18:29 +0100)
committerDave Jones <davej@redhat.com>
Tue, 12 Dec 2006 22:20:49 +0000 (17:20 -0500)
We don't need a temporary variable to get the PCI revision ID.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dave Jones <davej@redhat.com>
arch/i386/kernel/cpu/cpufreq/gx-suspmod.c

index 0b9cc8aea954c260d5aefebd53c76f408a3ac373..6667e9cceb9fd8c3dbfe5d75a93008b27111a997 100644 (file)
@@ -447,7 +447,6 @@ static int __init cpufreq_gx_init(void)
        int ret;
        struct gxfreq_params *params;
        struct pci_dev *gx_pci;
-       u32 class_rev;
 
        /* Test if we have the right hardware */
        if ((gx_pci = gx_detect_chipset()) == NULL)
@@ -472,8 +471,7 @@ static int __init cpufreq_gx_init(void)
        pci_read_config_byte(params->cs55x0, PCI_PMER2, &(params->pci_pmer2));
        pci_read_config_byte(params->cs55x0, PCI_MODON, &(params->on_duration));
        pci_read_config_byte(params->cs55x0, PCI_MODOFF, &(params->off_duration));
-        pci_read_config_dword(params->cs55x0, PCI_CLASS_REVISION, &class_rev);
-       params->pci_rev = class_rev & 0xff;
+       pci_read_config_byte(params->cs55x0, PCI_REVISION_ID, &params->pci_rev);
 
        if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) {
                kfree(params);