diff options
author | RafaĆ Bilski <rafalbilski@interia.pl> | 2007-03-02 14:12:27 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2007-04-26 14:32:02 -0400 |
commit | fb48e15645fb702cb2ec02c84f82ece2fbc1574d (patch) | |
tree | 55f575b25e156bf2b0551897c43a1fd044bfaa48 /arch | |
parent | 551948bc44260a5ab3ad63546506b2062f77eaa0 (diff) |
[CPUFREQ] Longhaul - Correct PCI code
Replace obsolete pci_find_device with pci_get_device.
Signed-off-by: Rafal Bilski <rafalbilski@interia.pl>
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/longhaul.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index 2b030d6ccbf7..e5fee7266348 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c | |||
@@ -590,20 +590,23 @@ static acpi_status longhaul_walk_callback(acpi_handle obj_handle, | |||
590 | static int enable_arbiter_disable(void) | 590 | static int enable_arbiter_disable(void) |
591 | { | 591 | { |
592 | struct pci_dev *dev; | 592 | struct pci_dev *dev; |
593 | int status; | ||
593 | int reg; | 594 | int reg; |
594 | u8 pci_cmd; | 595 | u8 pci_cmd; |
595 | 596 | ||
597 | status = 1; | ||
596 | /* Find PLE133 host bridge */ | 598 | /* Find PLE133 host bridge */ |
597 | reg = 0x78; | 599 | reg = 0x78; |
598 | dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, NULL); | 600 | dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, |
601 | NULL); | ||
599 | /* Find CLE266 host bridge */ | 602 | /* Find CLE266 host bridge */ |
600 | if (dev == NULL) { | 603 | if (dev == NULL) { |
601 | reg = 0x76; | 604 | reg = 0x76; |
602 | dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_862X_0, NULL); | 605 | dev = pci_get_device(PCI_VENDOR_ID_VIA, |
606 | PCI_DEVICE_ID_VIA_862X_0, NULL); | ||
603 | /* Find CN400 V-Link host bridge */ | 607 | /* Find CN400 V-Link host bridge */ |
604 | if (dev == NULL) | 608 | if (dev == NULL) |
605 | dev = pci_find_device(PCI_VENDOR_ID_VIA, 0x7259, NULL); | 609 | dev = pci_get_device(PCI_VENDOR_ID_VIA, 0x7259, NULL); |
606 | |||
607 | } | 610 | } |
608 | if (dev != NULL) { | 611 | if (dev != NULL) { |
609 | /* Enable access to port 0x22 */ | 612 | /* Enable access to port 0x22 */ |
@@ -615,10 +618,11 @@ static int enable_arbiter_disable(void) | |||
615 | if (!(pci_cmd & 1<<7)) { | 618 | if (!(pci_cmd & 1<<7)) { |
616 | printk(KERN_ERR PFX | 619 | printk(KERN_ERR PFX |
617 | "Can't enable access to port 0x22.\n"); | 620 | "Can't enable access to port 0x22.\n"); |
618 | return 0; | 621 | status = 0; |
619 | } | 622 | } |
620 | } | 623 | } |
621 | return 1; | 624 | pci_dev_put(dev); |
625 | return status; | ||
622 | } | 626 | } |
623 | return 0; | 627 | return 0; |
624 | } | 628 | } |
@@ -629,7 +633,7 @@ static int longhaul_setup_vt8235(void) | |||
629 | u8 pci_cmd; | 633 | u8 pci_cmd; |
630 | 634 | ||
631 | /* Find VT8235 southbridge */ | 635 | /* Find VT8235 southbridge */ |
632 | dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, NULL); | 636 | dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, NULL); |
633 | if (dev != NULL) { | 637 | if (dev != NULL) { |
634 | /* Set transition time to max */ | 638 | /* Set transition time to max */ |
635 | pci_read_config_byte(dev, 0xec, &pci_cmd); | 639 | pci_read_config_byte(dev, 0xec, &pci_cmd); |
@@ -641,6 +645,7 @@ static int longhaul_setup_vt8235(void) | |||
641 | pci_read_config_byte(dev, 0xe5, &pci_cmd); | 645 | pci_read_config_byte(dev, 0xe5, &pci_cmd); |
642 | pci_cmd |= 1 << 7; | 646 | pci_cmd |= 1 << 7; |
643 | pci_write_config_byte(dev, 0xe5, pci_cmd); | 647 | pci_write_config_byte(dev, 0xe5, pci_cmd); |
648 | pci_dev_put(dev); | ||
644 | return 1; | 649 | return 1; |
645 | } | 650 | } |
646 | return 0; | 651 | return 0; |