aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOctavian Purdila <octavian.purdila@intel.com>2011-07-15 12:33:26 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-07-15 13:05:07 -0400
commita458ca1edc318bc63a632b97ab3d04b86b81f7ef (patch)
treef116f5a84d79c915b4b019b7e276153da570a35a
parent7d7b7adf6bf934064c8fdc4031e75f1a20aaac92 (diff)
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>
-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)
185 * perform the necessary shut down steps and save enough state that 185 * perform the necessary shut down steps and save enough state that
186 * we can undo this when resume is called. 186 * we can undo this when resume is called.
187 */ 187 */
188int gma_power_suspend(struct pci_dev *pdev, pm_message_t state) 188int gma_power_suspend(struct device *_dev)
189{ 189{
190 struct pci_dev *pdev = container_of(_dev, struct pci_dev, dev);
190 struct drm_device *dev = pci_get_drvdata(pdev); 191 struct drm_device *dev = pci_get_drvdata(pdev);
191 struct drm_psb_private *dev_priv = dev->dev_private; 192 struct drm_psb_private *dev_priv = dev->dev_private;
192 193
@@ -210,8 +211,9 @@ int gma_power_suspend(struct pci_dev *pdev, pm_message_t state)
210 * 211 *
211 * Resume the PCI side of the graphics and then the displays 212 * Resume the PCI side of the graphics and then the displays
212 */ 213 */
213int gma_power_resume(struct pci_dev *pdev) 214int gma_power_resume(struct device *_dev)
214{ 215{
216 struct pci_dev *pdev = container_of(_dev, struct pci_dev, dev);
215 struct drm_device *dev = pci_get_drvdata(pdev); 217 struct drm_device *dev = pci_get_drvdata(pdev);
216 218
217 mutex_lock(&power_mutex); 219 mutex_lock(&power_mutex);
@@ -295,8 +297,7 @@ void gma_power_end(struct drm_device *dev)
295 297
296int psb_runtime_suspend(struct device *dev) 298int psb_runtime_suspend(struct device *dev)
297{ 299{
298 static pm_message_t dummy; 300 return gma_power_suspend(dev);
299 return gma_power_suspend(to_pci_dev(dev), dummy);
300} 301}
301 302
302int psb_runtime_resume(struct device *dev) 303int 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);
39/* 39/*
40 * The kernel bus power management will call these functions 40 * The kernel bus power management will call these functions
41 */ 41 */
42int gma_power_suspend(struct pci_dev *pdev, pm_message_t state); 42int gma_power_suspend(struct device *dev);
43int gma_power_resume(struct pci_dev *pdev); 43int gma_power_resume(struct device *dev);
44 44
45/* 45/*
46 * These are the functions the driver should use to wrap all hw access 46 * 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)
1144} 1144}
1145 1145
1146static const struct dev_pm_ops psb_pm_ops = { 1146static const struct dev_pm_ops psb_pm_ops = {
1147 .resume = gma_power_resume,
1148 .suspend = gma_power_suspend,
1147 .runtime_suspend = psb_runtime_suspend, 1149 .runtime_suspend = psb_runtime_suspend,
1148 .runtime_resume = psb_runtime_resume, 1150 .runtime_resume = psb_runtime_resume,
1149 .runtime_idle = psb_runtime_idle, 1151 .runtime_idle = psb_runtime_idle,
@@ -1205,13 +1207,9 @@ static struct drm_driver driver = {
1205static struct pci_driver psb_pci_driver = { 1207static struct pci_driver psb_pci_driver = {
1206 .name = DRIVER_NAME, 1208 .name = DRIVER_NAME,
1207 .id_table = pciidlist, 1209 .id_table = pciidlist,
1208 .resume = gma_power_resume,
1209 .suspend = gma_power_suspend,
1210 .probe = psb_probe, 1210 .probe = psb_probe,
1211 .remove = psb_remove, 1211 .remove = psb_remove,
1212#ifdef CONFIG_PM
1213 .driver.pm = &psb_pm_ops, 1212 .driver.pm = &psb_pm_ops,
1214#endif
1215}; 1213};
1216 1214
1217static int psb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 1215static int psb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)