summaryrefslogtreecommitdiffstats
path: root/drivers/staging/gma500
diff options
context:
space:
mode:
authorOctavian Purdila2011-07-15 18:33:26 +0200
committerGreg Kroah-Hartman2011-07-15 19:05:07 +0200
commita458ca1edc318bc63a632b97ab3d04b86b81f7ef (patch)
treef116f5a84d79c915b4b019b7e276153da570a35a /drivers/staging/gma500
parentgma500: allow the creation of 'stolen' memory objects (diff)
downloadkernel-qcow2-linux-a458ca1edc318bc63a632b97ab3d04b86b81f7ef.tar.gz
kernel-qcow2-linux-a458ca1edc318bc63a632b97ab3d04b86b81f7ef.tar.xz
kernel-qcow2-linux-a458ca1edc318bc63a632b97ab3d04b86b81f7ef.zip
gma500: remove the legacy PM method
PCI core only prefer one of legacy PM and new PM. And since runtime pm is implemented, which requires the new PM method, we should remove the legacy PM method. Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/gma500')
-rw-r--r--drivers/staging/gma500/power.c9
-rw-r--r--drivers/staging/gma500/power.h4
-rw-r--r--drivers/staging/gma500/psb_drv.c6
3 files changed, 9 insertions, 10 deletions
diff --git a/drivers/staging/gma500/power.c b/drivers/staging/gma500/power.c
index 5cd502306637..972bea7c1af2 100644
--- a/drivers/staging/gma500/power.c
+++ b/drivers/staging/gma500/power.c
@@ -185,8 +185,9 @@ static bool gma_resume_pci(struct pci_dev *pdev)
* perform the necessary shut down steps and save enough state that
* we can undo this when resume is called.
*/
-int gma_power_suspend(struct pci_dev *pdev, pm_message_t state)
+int gma_power_suspend(struct device *_dev)
{
+ struct pci_dev *pdev = container_of(_dev, struct pci_dev, dev);
struct drm_device *dev = pci_get_drvdata(pdev);
struct drm_psb_private *dev_priv = dev->dev_private;
@@ -210,8 +211,9 @@ int gma_power_suspend(struct pci_dev *pdev, pm_message_t state)
*
* Resume the PCI side of the graphics and then the displays
*/
-int gma_power_resume(struct pci_dev *pdev)
+int gma_power_resume(struct device *_dev)
{
+ struct pci_dev *pdev = container_of(_dev, struct pci_dev, dev);
struct drm_device *dev = pci_get_drvdata(pdev);
mutex_lock(&power_mutex);
@@ -295,8 +297,7 @@ void gma_power_end(struct drm_device *dev)
int psb_runtime_suspend(struct device *dev)
{
- static pm_message_t dummy;
- return gma_power_suspend(to_pci_dev(dev), dummy);
+ return gma_power_suspend(dev);
}
int psb_runtime_resume(struct device *dev)
diff --git a/drivers/staging/gma500/power.h b/drivers/staging/gma500/power.h
index 333b28dbfdbc..1969d2ecb328 100644
--- a/drivers/staging/gma500/power.h
+++ b/drivers/staging/gma500/power.h
@@ -39,8 +39,8 @@ void gma_power_uninit(struct drm_device *dev);
/*
* The kernel bus power management will call these functions
*/
-int gma_power_suspend(struct pci_dev *pdev, pm_message_t state);
-int gma_power_resume(struct pci_dev *pdev);
+int gma_power_suspend(struct device *dev);
+int gma_power_resume(struct device *dev);
/*
* These are the functions the driver should use to wrap all hw access
diff --git a/drivers/staging/gma500/psb_drv.c b/drivers/staging/gma500/psb_drv.c
index b8b98643bdca..f96a619cb63f 100644
--- a/drivers/staging/gma500/psb_drv.c
+++ b/drivers/staging/gma500/psb_drv.c
@@ -1144,6 +1144,8 @@ static void psb_remove(struct pci_dev *pdev)
}
static const struct dev_pm_ops psb_pm_ops = {
+ .resume = gma_power_resume,
+ .suspend = gma_power_suspend,
.runtime_suspend = psb_runtime_suspend,
.runtime_resume = psb_runtime_resume,
.runtime_idle = psb_runtime_idle,
@@ -1205,13 +1207,9 @@ static struct drm_driver driver = {
static struct pci_driver psb_pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
- .resume = gma_power_resume,
- .suspend = gma_power_suspend,
.probe = psb_probe,
.remove = psb_remove,
-#ifdef CONFIG_PM
.driver.pm = &psb_pm_ops,
-#endif
};
static int psb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)