Commit 6750ed12 authored by Dave Jones's avatar Dave Jones

[AGPGART] Fix agp=off.

agp=off disabled the agpgart driver, but not the chipset specific drivers,
which still did their init routines. Chaos ensued.
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 33deca11
...@@ -396,6 +396,8 @@ static struct pci_driver agp_ali_pci_driver = { ...@@ -396,6 +396,8 @@ static struct pci_driver agp_ali_pci_driver = {
static int __init agp_ali_init(void) static int __init agp_ali_init(void)
{ {
if (agp_off)
return -EINVAL;
return pci_module_init(&agp_ali_pci_driver); return pci_module_init(&agp_ali_pci_driver);
} }
......
...@@ -195,6 +195,8 @@ alpha_core_agp_setup(void) ...@@ -195,6 +195,8 @@ alpha_core_agp_setup(void)
static int __init agp_alpha_core_init(void) static int __init agp_alpha_core_init(void)
{ {
if (agp_off)
return -EINVAL;
if (alpha_mv.agp_info) if (alpha_mv.agp_info)
return alpha_core_agp_setup(); return alpha_core_agp_setup();
return -ENODEV; return -ENODEV;
......
...@@ -478,6 +478,8 @@ static struct pci_driver agp_amdk7_pci_driver = { ...@@ -478,6 +478,8 @@ static struct pci_driver agp_amdk7_pci_driver = {
static int __init agp_amdk7_init(void) static int __init agp_amdk7_init(void)
{ {
if (agp_off)
return -EINVAL;
return pci_module_init(&agp_amdk7_pci_driver); return pci_module_init(&agp_amdk7_pci_driver);
} }
......
...@@ -529,6 +529,8 @@ static struct pci_driver agp_ati_pci_driver = { ...@@ -529,6 +529,8 @@ static struct pci_driver agp_ati_pci_driver = {
static int __init agp_ati_init(void) static int __init agp_ati_init(void)
{ {
if (agp_off)
return -EINVAL;
return pci_module_init(&agp_ati_pci_driver); return pci_module_init(&agp_ati_pci_driver);
} }
......
...@@ -441,6 +441,9 @@ static int __init agp_efficeon_init(void) ...@@ -441,6 +441,9 @@ static int __init agp_efficeon_init(void)
{ {
static int agp_initialised=0; static int agp_initialised=0;
if (agp_off)
return -EINVAL;
if (agp_initialised == 1) if (agp_initialised == 1)
return 0; return 0;
agp_initialised=1; agp_initialised=1;
......
...@@ -524,6 +524,8 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret) ...@@ -524,6 +524,8 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret)
static int __init static int __init
agp_hp_init (void) agp_hp_init (void)
{ {
if (agp_off)
return -EINVAL;
acpi_get_devices("HWP0003", zx1_gart_probe, "HWP0003", NULL); acpi_get_devices("HWP0003", zx1_gart_probe, "HWP0003", NULL);
if (hp_zx1_gart_found) if (hp_zx1_gart_found)
......
...@@ -622,6 +622,8 @@ static struct pci_driver agp_intel_i460_pci_driver = { ...@@ -622,6 +622,8 @@ static struct pci_driver agp_intel_i460_pci_driver = {
static int __init agp_intel_i460_init(void) static int __init agp_intel_i460_init(void)
{ {
if (agp_off)
return -EINVAL;
return pci_module_init(&agp_intel_i460_pci_driver); return pci_module_init(&agp_intel_i460_pci_driver);
} }
......
...@@ -405,6 +405,8 @@ static struct pci_driver agp_nvidia_pci_driver = { ...@@ -405,6 +405,8 @@ static struct pci_driver agp_nvidia_pci_driver = {
static int __init agp_nvidia_init(void) static int __init agp_nvidia_init(void)
{ {
if (agp_off)
return -EINVAL;
return pci_module_init(&agp_nvidia_pci_driver); return pci_module_init(&agp_nvidia_pci_driver);
} }
......
...@@ -340,6 +340,8 @@ static struct pci_driver agp_sis_pci_driver = { ...@@ -340,6 +340,8 @@ static struct pci_driver agp_sis_pci_driver = {
static int __init agp_sis_init(void) static int __init agp_sis_init(void)
{ {
if (agp_off)
return -EINVAL;
return pci_module_init(&agp_sis_pci_driver); return pci_module_init(&agp_sis_pci_driver);
} }
......
...@@ -539,6 +539,8 @@ static struct pci_driver agp_serverworks_pci_driver = { ...@@ -539,6 +539,8 @@ static struct pci_driver agp_serverworks_pci_driver = {
static int __init agp_serverworks_init(void) static int __init agp_serverworks_init(void)
{ {
if (agp_off)
return -EINVAL;
return pci_module_init(&agp_serverworks_pci_driver); return pci_module_init(&agp_serverworks_pci_driver);
} }
......
...@@ -373,6 +373,8 @@ static struct pci_driver agp_uninorth_pci_driver = { ...@@ -373,6 +373,8 @@ static struct pci_driver agp_uninorth_pci_driver = {
static int __init agp_uninorth_init(void) static int __init agp_uninorth_init(void)
{ {
if (agp_off)
return -EINVAL;
return pci_module_init(&agp_uninorth_pci_driver); return pci_module_init(&agp_uninorth_pci_driver);
} }
......
...@@ -523,6 +523,8 @@ static struct pci_driver agp_via_pci_driver = { ...@@ -523,6 +523,8 @@ static struct pci_driver agp_via_pci_driver = {
static int __init agp_via_init(void) static int __init agp_via_init(void)
{ {
if (agp_off)
return -EINVAL;
return pci_module_init(&agp_via_pci_driver); return pci_module_init(&agp_via_pci_driver);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment