X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fagp%2Fvia-agp.c;h=b15dcd941bb0d7e5412f42155b802e01e07cf5cf;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=bcaea8ec35b69ed62925530c8e5dd3c8fdc61a38;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c index bcaea8ec3..b15dcd941 100644 --- a/drivers/char/agp/via-agp.c +++ b/drivers/char/agp/via-agp.c @@ -442,7 +442,7 @@ static void __devexit agp_via_remove(struct pci_dev *pdev) static int agp_via_suspend(struct pci_dev *pdev, u32 state) { - pci_save_state (pdev, pdev->saved_config_space); + pci_save_state (pdev); pci_set_power_state (pdev, 3); return 0; @@ -453,7 +453,7 @@ static int agp_via_resume(struct pci_dev *pdev) struct agp_bridge_data *bridge = pci_get_drvdata(pdev); pci_set_power_state (pdev, 0); - pci_restore_state(pdev, pdev->saved_config_space); + pci_restore_state(pdev); if (bridge->driver == &via_agp3_driver) return via_configure_agp3(); @@ -523,6 +523,8 @@ static struct pci_driver agp_via_pci_driver = { static int __init agp_via_init(void) { + if (agp_off) + return -EINVAL; return pci_module_init(&agp_via_pci_driver); }