staging: vboxvideo: Fold vbox_drm_resume() into vbox_pm_resume()
authorHans de Goede <hdegoede@redhat.com>
Tue, 18 Sep 2018 17:44:31 +0000 (19:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Sep 2018 10:32:05 +0000 (12:32 +0200)
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@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vboxvideo/vbox_drv.c

index c4290d4b4a53a3c1d95207872146c4bd632d819a..c6a53b0ad66cf4f2e3347e550a6c815a558220f1 100644 (file)
@@ -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)