aboutsummaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-31 11:54:13 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-31 11:54:13 -0800
commit2d959e95658a0224b0dd0d787926d5ffc95f9574 (patch)
tree50654e11ffbc1ee913f6ebd174add04d2daeabe7 /drivers/char
parent9d6e323c687c7b94c703c9b0900a74e5d262d462 (diff)
parentf405d2c02395a74d3883bd03ded36457aa3697ad (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/agp: Fix agp_amd64_init() initialization with CONFIG_GART_IOMMU enabled x86: SGI UV: Fix writes to led registers on remote uv hubs x86, kmemcheck: Use KERN_WARNING for error reporting x86: Use KERN_DEFAULT log-level in __show_regs() x86, compress: Force i386 instructions for the decompressor x86/amd-iommu: Fix initialization failure panic dma-debug: Do not add notifier when dma debugging is disabled. x86: Fix objdump version check in chkobjdump.awk for different formats. Trivial conflicts in arch/x86/include/asm/uv/uv_hub.h due to me having applied an earlier version of an SGI UV fix.
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/agp/amd64-agp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 2fb2e6cc322a..5aa7a586a7ff 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -725,9 +725,14 @@ static struct pci_driver agp_amd64_pci_driver = {
int __init agp_amd64_init(void)
{
int err = 0;
+ static int done = 0;
if (agp_off)
return -EINVAL;
+
+ if (done++)
+ return agp_bridges_found ? 0 : -ENODEV;
+
err = pci_register_driver(&agp_amd64_pci_driver);
if (err < 0)
return err;
@@ -771,12 +776,8 @@ static void __exit agp_amd64_cleanup(void)
pci_unregister_driver(&agp_amd64_pci_driver);
}
-/* On AMD64 the PCI driver needs to initialize this driver early
- for the IOMMU, so it has to be called via a backdoor. */
-#ifndef CONFIG_GART_IOMMU
module_init(agp_amd64_init);
module_exit(agp_amd64_cleanup);
-#endif
MODULE_AUTHOR("Dave Jones <davej@redhat.com>, Andi Kleen");
module_param(agp_try_unsupported, bool, 0);