[CPUFREQ] longhaul: remove duplicated code.

removing duplicated code.

Signed-off-by: Rafa Bilski <rafalbilski@interia.pl>
Signed-off-by: Dave Jones <davej@redhat.com>
This commit is contained in:
Rafa Bilski
2006-09-27 08:25:27 +02:00
committed by Dave Jones
parent 7f1be89247
commit eed7d41257

View File

@@ -581,8 +581,8 @@ static int enable_arbiter_disable(void)
dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, NULL); dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, NULL);
/* Find CLE266 host bridge */ /* Find CLE266 host bridge */
if (dev == NULL) { if (dev == NULL) {
dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_862X_0, NULL);
reg = 0x76; reg = 0x76;
dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_862X_0, NULL);
} }
if (dev != NULL) { if (dev != NULL) {
/* Enable access to port 0x22 */ /* Enable access to port 0x22 */
@@ -693,16 +693,11 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
if (longhaul_version == TYPE_POWERSAVER) { if (longhaul_version == TYPE_POWERSAVER) {
/* Check ACPI support for C3 state */ /* Check ACPI support for C3 state */
cx = &pr->power.states[ACPI_STATE_C3]; cx = &pr->power.states[ACPI_STATE_C3];
if (cx->address == 0 || if (cx->address > 0 &&
(cx->latency > 1000 && ignore_latency == 0) ) { (cx->latency <= 1000 || ignore_latency != 0) ) {
if (enable_arbiter_disable()) { goto print_support_type;
port22_en = 1;
} else {
goto err_acpi;
} }
} }
} else {
/* Check ACPI support for bus master arbiter disable */ /* Check ACPI support for bus master arbiter disable */
if (!pr->flags.bm_control) { if (!pr->flags.bm_control) {
if (enable_arbiter_disable()) { if (enable_arbiter_disable()) {
@@ -711,7 +706,7 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
goto err_acpi; goto err_acpi;
} }
} }
} print_support_type:
if (!port22_en) { if (!port22_en) {
printk (KERN_INFO PFX "Using ACPI support.\n"); printk (KERN_INFO PFX "Using ACPI support.\n");
} else { } else {