diff options
author | Hans de Goede <hdegoede@redhat.com> | 2018-09-18 19:44:31 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-20 12:32:05 +0200 |
commit | 3498ea8b7e3c8b2fd2575780cb76c4c91a346c6d (patch) | |
tree | 232fd0b83b08e11012f1c1c009bf65b4bd4217eb /drivers/staging/vboxvideo | |
parent | 01648890f336a33cd1ac89b264e9ff87a3b85690 (diff) |
staging: vboxvideo: Fold vbox_drm_resume() into vbox_pm_resume()
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>
Diffstat (limited to 'drivers/staging/vboxvideo')
-rw-r--r-- | drivers/staging/vboxvideo/vbox_drv.c | 28 |
1 files 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) |