[PATCH 05/12] staging: vboxvideo: Fold vbox_drm_resume() into vbox_pm_resume()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



vbox_pm_resume() is the only caller of vbox_drm_resume(), so squash the
2 functions into 1.

Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
---
 drivers/staging/vboxvideo/vbox_drv.c | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/vboxvideo/vbox_drv.c b/drivers/staging/vboxvideo/vbox_drv.c
index c4290d4b4a53..c6a53b0ad66c 100644
--- a/drivers/staging/vboxvideo/vbox_drv.c
+++ b/drivers/staging/vboxvideo/vbox_drv.c
@@ -152,22 +152,6 @@ static int vbox_drm_thaw(struct vbox_private *vbox)
 	return 0;
 }
 
-static int vbox_drm_resume(struct vbox_private *vbox)
-{
-	int ret;
-
-	if (pci_enable_device(vbox->ddev.pdev))
-		return -EIO;
-
-	ret = vbox_drm_thaw(vbox);
-	if (ret)
-		return ret;
-
-	drm_kms_helper_poll_enable(&vbox->ddev);
-
-	return 0;
-}
-
 static int vbox_pm_suspend(struct device *dev)
 {
 	struct vbox_private *vbox = dev_get_drvdata(dev);
@@ -186,8 +170,18 @@ static int vbox_pm_suspend(struct device *dev)
 static int vbox_pm_resume(struct device *dev)
 {
 	struct vbox_private *vbox = dev_get_drvdata(dev);
+	int ret;
 
-	return vbox_drm_resume(vbox);
+	if (pci_enable_device(vbox->ddev.pdev))
+		return -EIO;
+
+	ret = vbox_drm_thaw(vbox);
+	if (ret)
+		return ret;
+
+	drm_kms_helper_poll_enable(&vbox->ddev);
+
+	return 0;
 }
 
 static int vbox_pm_freeze(struct device *dev)
-- 
2.19.0.rc1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux