Re: [PATCH] Add basic PM support for Nvidia and ATI AGP bridges

From: Rolf Eike Beer
Date: Thu Nov 24 2005 - 06:43:24 EST


Matthew Garrett wrote:
>I retrieved these from the swsusp2 patchset, but they seem to be
>independently useful. As a result, I'm not sure who the original author
>is - however, they seem to be pretty obvious.

>@DPATCH@
>diff -ruNp 210-agp-resume-support.patch-old/drivers/char/agp/ati-agp.c
> 210-agp-resume-support.patch-new/drivers/char/agp/ati-agp.c ---
> 210-agp-resume-support.patch-old/drivers/char/agp/ati-agp.c 2005-06-20
> 11:46:51.000000000 +1000 +++
> 210-agp-resume-support.patch-new/drivers/char/agp/ati-agp.c 2005-07-04
> 23:14:18.000000000 +1000 @@ -507,6 +507,33 @@ static void __devexit
> agp_ati_remove(str
> agp_put_bridge(bridge);
> }
>
>+#ifdef CONFIG_PM
>+
>+static int agp_ati_suspend(struct pci_dev *pdev, pm_message_t state)
>+{
>+ pci_save_state (pdev);
>+ pci_set_power_state (pdev, 3);

Please remove the spaces after the function names.

>diff -ruNp 210-agp-resume-support.patch-old/drivers/char/agp/nvidia-agp.c
> 210-agp-resume-support.patch-new/drivers/char/agp/nvidia-agp.c ---
> 210-agp-resume-support.patch-old/drivers/char/agp/nvidia-agp.c 2005-06-20
> 11:46:51.000000000 +1000 +++
> 210-agp-resume-support.patch-new/drivers/char/agp/nvidia-agp.c 2005-07-04
> 23:14:18.000000000 +1000 @@ -397,11 +397,40 @@ static struct pci_device_id
> agp_nvidia_p
>
> MODULE_DEVICE_TABLE(pci, agp_nvidia_pci_table);
>
>+#ifdef CONFIG_PM
>+static int agp_nvidia_suspend(struct pci_dev *pdev, pm_message_t state)
>+{
>+ pci_save_state (pdev);
>+ pci_set_power_state (pdev, 3);

Same here.

Eike

Attachment: pgp00000.pgp
Description: PGP signature