diff options
author | Rafa� Bilski <rafalbilski@interia.pl> | 2006-09-27 02:25:27 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-09-27 17:03:36 -0400 |
commit | eed7d41257e2a2a38b3ad121b8948f7bfeaa21c0 (patch) | |
tree | c32cb37f2c051068b5446801b65a63df02df634b /arch/i386 | |
parent | 7f1be8924791535c5fdc6749d1f119e141baa122 (diff) |
[CPUFREQ] longhaul: remove duplicated code.
removing duplicated code.
Signed-off-by: Rafa� Bilski <rafalbilski@interia.pl>
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/longhaul.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index 4e8dd743d00b..7233abe5d695 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c | |||
@@ -581,8 +581,8 @@ static int enable_arbiter_disable(void) | |||
581 | dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, NULL); | 581 | dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, NULL); |
582 | /* Find CLE266 host bridge */ | 582 | /* Find CLE266 host bridge */ |
583 | if (dev == NULL) { | 583 | if (dev == NULL) { |
584 | dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_862X_0, NULL); | ||
585 | reg = 0x76; | 584 | reg = 0x76; |
585 | dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_862X_0, NULL); | ||
586 | } | 586 | } |
587 | if (dev != NULL) { | 587 | if (dev != NULL) { |
588 | /* Enable access to port 0x22 */ | 588 | /* Enable access to port 0x22 */ |
@@ -693,25 +693,20 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy) | |||
693 | if (longhaul_version == TYPE_POWERSAVER) { | 693 | if (longhaul_version == TYPE_POWERSAVER) { |
694 | /* Check ACPI support for C3 state */ | 694 | /* Check ACPI support for C3 state */ |
695 | cx = &pr->power.states[ACPI_STATE_C3]; | 695 | cx = &pr->power.states[ACPI_STATE_C3]; |
696 | if (cx->address == 0 || | 696 | if (cx->address > 0 && |
697 | (cx->latency > 1000 && ignore_latency == 0) ) { | 697 | (cx->latency <= 1000 || ignore_latency != 0) ) { |
698 | if (enable_arbiter_disable()) { | 698 | goto print_support_type; |
699 | port22_en = 1; | ||
700 | } else { | ||
701 | goto err_acpi; | ||
702 | } | ||
703 | } | 699 | } |
704 | 700 | } | |
705 | } else { | 701 | /* Check ACPI support for bus master arbiter disable */ |
706 | /* Check ACPI support for bus master arbiter disable */ | 702 | if (!pr->flags.bm_control) { |
707 | if (!pr->flags.bm_control) { | 703 | if (enable_arbiter_disable()) { |
708 | if (enable_arbiter_disable()) { | 704 | port22_en = 1; |
709 | port22_en = 1; | 705 | } else { |
710 | } else { | 706 | goto err_acpi; |
711 | goto err_acpi; | ||
712 | } | ||
713 | } | 707 | } |
714 | } | 708 | } |
709 | print_support_type: | ||
715 | if (!port22_en) { | 710 | if (!port22_en) { |
716 | printk (KERN_INFO PFX "Using ACPI support.\n"); | 711 | printk (KERN_INFO PFX "Using ACPI support.\n"); |
717 | } else { | 712 | } else { |