mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
01648890f3
commit
3498ea8b7e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue