agp/intel: Convert to generic power management
authorBjorn Helgaas <bhelgaas@google.com>
Tue, 25 Oct 2022 20:38:46 +0000 (15:38 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 26 Oct 2022 16:25:22 +0000 (11:25 -0500)
commit7f142022e6bfd2dd5ed998f7165e396bf5966513
treea0d740bef80f4a6ace7fb7bd2cd7b0cdd4f97265
parent94e9f9a23fe4b093cd5a8b292165fad840242b79
agp/intel: Convert to generic power management

Convert agpgart-intel from legacy PCI power management to the generic power
management framework.

Previously agpgart-intel used legacy PCI power management, and
agp_intel_resume() was responsible for both device-specific things and
generic PCI things like saving and restoring config space and managing
power state.

In this case, agp_intel_suspend() was empty, and agp_intel_resume()
already did only device-specific things, so simply convert it to take a
struct device * instead of a struct pci_dev *.

Based on 0aeddbd0cb07 ("via-agp: convert to generic power management") by
Vaibhav Gupta <vaibhavgupta40@gmail.com>.

Link: https://lore.kernel.org/r/20221025203852.681822-3-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Dave Airlie <airlied@redhat.com>
drivers/char/agp/intel-agp.c