gfx: display: remove legacy pm interface
authorKristen Carlson Accardi <kristen@linux.intel.com>
Mon, 5 Dec 2011 10:37:48 +0000 (12:37 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:28:45 +0000 (12:28 +0300)
Drivers should not support both legacy and new pm framework.

Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/staging/mrst/drv/psb_drv.c
drivers/staging/mrst/drv/psb_powermgmt.c
drivers/staging/mrst/drv/psb_powermgmt.h

index e9eef28..47c74ee 100644 (file)
@@ -2700,6 +2700,8 @@ static const struct dev_pm_ops psb_pm_ops = {
        .runtime_suspend = psb_runtime_suspend,
        .runtime_resume = psb_runtime_resume,
        .runtime_idle = psb_runtime_idle,
+       .resume = ospm_power_resume,
+       .suspend = ospm_power_suspend,
 };
 
 static struct drm_driver driver = {
@@ -2746,8 +2748,6 @@ static struct drm_driver driver = {
 static struct pci_driver psb_pci_driver = {
        .name = DRIVER_NAME,
        .id_table = pciidlist,
-       .resume = ospm_power_resume,
-       .suspend = ospm_power_suspend,
        .probe = psb_probe,
        .remove = psb_remove,
 #ifdef CONFIG_PM
index 5b2db03..711e9cb 100644 (file)
@@ -1261,8 +1261,9 @@ static bool ospm_resume_pci(struct pci_dev *pdev)
  * Description: OSPM is telling our driver to suspend so save state
  * and power down all hardware.
  */
-int ospm_power_suspend(struct pci_dev *pdev, pm_message_t state)
+int ospm_power_suspend(struct device *dev)
 {
+       struct pci_dev *pdev = to_pci_dev(dev);
        int ret = 0;
        int graphics_access_count;
        int videoenc_access_count;
@@ -1422,8 +1423,10 @@ void ospm_power_island_up(int hw_islands)
 /*
  * ospm_power_resume
  */
-int ospm_power_resume(struct pci_dev *pdev)
+int ospm_power_resume(struct device *dev)
 {
+       struct pci_dev *pdev = to_pci_dev(dev);
+
        if (gbSuspendInProgress || gbResumeInProgress) {
 #ifdef OSPM_GFX_DPK
                printk(KERN_ALERT "OSPM_GFX_DPK: %s hw_island: Suspend || gbResumeInProgress!!!! \n", __func__);
@@ -1798,9 +1801,7 @@ void ospm_runtime_pm_forbid(struct drm_device * dev)
 
 int psb_runtime_suspend(struct device *dev)
 {
-       pm_message_t state;
        int ret = 0;
-       state.event = 0;
 
 #ifdef OSPM_GFX_DPK
        printk(KERN_ALERT "OSPM_GFX_DPK: %s \n", __func__);
@@ -1815,7 +1816,7 @@ int psb_runtime_suspend(struct device *dev)
                 return -EBUSY;
         }
         else
-               ret = ospm_power_suspend(gpDrmDevice->pdev, state);
+               ret = ospm_power_suspend(&gpDrmDevice->pdev->dev);
 
        return ret;
 }
index a645c9a..82afbb8 100644 (file)
@@ -67,8 +67,8 @@ void ospm_power_uninit(void);
 /*
  * OSPM will call these functions
  */
-int ospm_power_suspend(struct pci_dev *pdev, pm_message_t state);
-int ospm_power_resume(struct pci_dev *pdev);
+int ospm_power_suspend(struct device *dev);
+int ospm_power_resume(struct device *dev);
 
 /*
  * These are the functions the driver should use to wrap all hw access