Skip to content

Commit

Permalink
[CPUFREQ] Optimize gx-suspmod revision ID fetching
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jean Delvare authored and Dave Jones committed Dec 12, 2006
1 parent 474a14d commit 55e3373
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down

0 comments on commit 55e3373

Please sign in to comment.