Commit 55e33734 authored by Jean Delvare's avatar Jean Delvare Committed by Dave Jones

[CPUFREQ] Optimize gx-suspmod revision ID fetching

We don't need a temporary variable to get the PCI revision ID.
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 474a14df
...@@ -447,7 +447,6 @@ static int __init cpufreq_gx_init(void) ...@@ -447,7 +447,6 @@ static int __init cpufreq_gx_init(void)
int ret; int ret;
struct gxfreq_params *params; struct gxfreq_params *params;
struct pci_dev *gx_pci; struct pci_dev *gx_pci;
u32 class_rev;
/* Test if we have the right hardware */ /* Test if we have the right hardware */
if ((gx_pci = gx_detect_chipset()) == NULL) if ((gx_pci = gx_detect_chipset()) == NULL)
...@@ -472,8 +471,7 @@ static int __init cpufreq_gx_init(void) ...@@ -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_PMER2, &(params->pci_pmer2));
pci_read_config_byte(params->cs55x0, PCI_MODON, &(params->on_duration)); 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_byte(params->cs55x0, PCI_MODOFF, &(params->off_duration));
pci_read_config_dword(params->cs55x0, PCI_CLASS_REVISION, &class_rev); pci_read_config_byte(params->cs55x0, PCI_REVISION_ID, &params->pci_rev);
params->pci_rev = class_rev & 0xff;
if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) { if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) {
kfree(params); kfree(params);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment