ati-agp suspend/resume support
PATCH 1/1 ati-agp suspend/resume support
Based on the patch at
http://unixhead.org/docs/thinkpad/ati-agp/ati-agp.diff, add support for suspend/resume in the ati-agp module.
--- linux-2.6.15-rc6/drivers/char/agp/ati-agp.c.orig 2005-12-25
22:21:32.000000000 +0200
+++ linux-2.6.15-rc6/drivers/char/agp/ati-agp.c 2005-12-25
22:23:33.000000000 +0200
@@ -243,6 +243,15 @@
return 0;
}
+static int ati_resume(struct pci_dev *dev)
+{
+ return ati_configure();
+}
+
+static int ati_suspend(struct pci_dev *dev, pm_message_t state) +{
+ return 0;
+}
/*
*Since we don't need contigious memory we just try
@@ -525,6 +534,8 @@
.id_table = agp_ati_pci_table,
.probe = agp_ati_probe,
.remove = agp_ati_remove,
+ .resume = ati_resume,
+ .suspend = ati_suspend,
};
static int __init agp_ati_init(void)
Signature · 3 lines
There are only 10 kinds of people in this world, those that understand binary and those that don't. http://www.kroon.co.za/
Hi!
Quoted 13 lines
Based on the patch at
http://unixhead.org/docs/thinkpad/ati-agp/ati-agp.diff, add support for suspend/resume in the ati-agp module.Signed-of-by Jaco Kroon <[email protected]>--- linux-2.6.15-rc6/drivers/char/agp/ati-agp.c.orig 2005-12-25
22:21:32.000000000 +0200
+++linux-2.6.15-rc6/drivers/char/agp/ati-agp.c2005-12-25
22:23:33.000000000 +0200(quoted diff) +0
-0@@ -243,6 +243,15 @@ return 0; }
Review line 254
Quoted 10 lines
(quoted diff) +9
-0+static int ati_resume(struct pci_dev *dev) +{ + return ati_configure(); +} + +static int ati_suspend(struct pci_dev *dev, pm_message_t state) +{ + return 0; +}
I think you can just leave out empty function; that should work, too. Otherwise it looks good, thanks... ...
Review line 539
Quoted 9 lines
(quoted diff) +2
-0/* *Since we don't need contigious memory we just try@@ -525,6 +534,8 @@ .id_table = agp_ati_pci_table, .probe = agp_ati_probe, .remove = agp_ati_remove, + .resume = ati_resume, + .suspend = ati_suspend, };
...aha, plus you may want to keep naming convention. It should probably be agp_ati_resume.
Pavel
Signature · 1 line
Thanks, Sharp!
Quoted 17 lines · Pavel Machek
Hi!
Quoted 14 lines
Based on the patch at
http://unixhead.org/docs/thinkpad/ati-agp/ati-agp.diff, add support for suspend/resume in the ati-agp module.Signed-of-by Jaco Kroon <[email protected]>--- linux-2.6.15-rc6/drivers/char/agp/ati-agp.c.orig 2005-12-25
22:21:32.000000000 +0200
+++linux-2.6.15-rc6/drivers/char/agp/ati-agp.c2005-12-25
22:23:33.000000000 +0200(quoted diff) +0
-0@@ -243,6 +243,15 @@ return 0; }
Quoted 13 lines
Review line 254
Quoted 9 lines
(quoted diff) +9
-0+static int ati_resume(struct pci_dev *dev) +{ + return ati_configure(); +} + +static int ati_suspend(struct pci_dev *dev, pm_message_t state) +{ + return 0; +}I think you can just leave out empty function; that should work, too. Otherwise it looks good, thanks... ...
That is indeed the case.
Quoted 4 lines
Quoted 4 lines
(quoted diff) +0
-0/* *Since we don't need contigious memory we just try@@ -525,6 +534,8 @@ .id_table = agp_ati_pci_table,
Quoted 8 lines
Review line 539
Quoted 5 lines
(quoted diff) +2
-0.probe = agp_ati_probe, .remove = agp_ati_remove, + .resume = ati_resume, + .suspend = ati_suspend, };...aha, plus you may want to keep naming convention. It should probably be
agp_ati_resume.
Done. Resubmitting in a second.
Signature · 3 lines
There are only 10 kinds of people in this world, those that understand binary and those that don't. http://www.kroon.co.za/