diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-16 15:31:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-16 15:31:42 -0500 |
commit | 330a518a1aae6724601903b278ce892d7ab08136 (patch) | |
tree | 11cfe776207693f0624b0c1412f5f1d117170f74 /drivers | |
parent | 2a8249daf6e2d643bf47a68a7fef2584a0597cb5 (diff) | |
parent | 1d2c867c941d635e53e8ad7bf37d060bb5b25ec5 (diff) |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, uv: Ensure hub revision set for all ACPI modes.
x86, uv: Add function retrieving node controller revision number
x86: xen: 64-bit kernel RPL should be 0
x86: kernel_thread() -- initialize SS to a known state
x86/agp: Fix agp_amd64_init and agp_amd64_cleanup
x86: SGI UV: Fix mapping of MMIO registers
x86: mce.h: Fix warning in header checks
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/agp/amd64-agp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 5aa7a586a7ff..1afb8968a342 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -725,12 +725,11 @@ static struct pci_driver agp_amd64_pci_driver = { | |||
725 | int __init agp_amd64_init(void) | 725 | int __init agp_amd64_init(void) |
726 | { | 726 | { |
727 | int err = 0; | 727 | int err = 0; |
728 | static int done = 0; | ||
729 | 728 | ||
730 | if (agp_off) | 729 | if (agp_off) |
731 | return -EINVAL; | 730 | return -EINVAL; |
732 | 731 | ||
733 | if (done++) | 732 | if (gart_iommu_aperture) |
734 | return agp_bridges_found ? 0 : -ENODEV; | 733 | return agp_bridges_found ? 0 : -ENODEV; |
735 | 734 | ||
736 | err = pci_register_driver(&agp_amd64_pci_driver); | 735 | err = pci_register_driver(&agp_amd64_pci_driver); |
@@ -771,6 +770,8 @@ int __init agp_amd64_init(void) | |||
771 | 770 | ||
772 | static void __exit agp_amd64_cleanup(void) | 771 | static void __exit agp_amd64_cleanup(void) |
773 | { | 772 | { |
773 | if (gart_iommu_aperture) | ||
774 | return; | ||
774 | if (aperture_resource) | 775 | if (aperture_resource) |
775 | release_resource(aperture_resource); | 776 | release_resource(aperture_resource); |
776 | pci_unregister_driver(&agp_amd64_pci_driver); | 777 | pci_unregister_driver(&agp_amd64_pci_driver); |