Commit 35a703df authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman

staging: vboxvideo: Fixup some #ifdef-s

Add #ifdef CONFIG_PM_SLEEP around the suspend/hibernate functions.

Remove unnecessary #ifdef CONFIG_COMPAT, the .compat_ioctl member is
always available and if CONFIG_COMPAT is not set then drm_compat_ioctl
is defined to NULL.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 650d4aad
...@@ -117,6 +117,7 @@ static void vbox_pci_remove(struct pci_dev *pdev) ...@@ -117,6 +117,7 @@ static void vbox_pci_remove(struct pci_dev *pdev)
drm_dev_put(&vbox->ddev); drm_dev_put(&vbox->ddev);
} }
#ifdef CONFIG_PM_SLEEP
static int vbox_pm_suspend(struct device *dev) static int vbox_pm_suspend(struct device *dev)
{ {
struct vbox_private *vbox = dev_get_drvdata(dev); struct vbox_private *vbox = dev_get_drvdata(dev);
...@@ -172,13 +173,16 @@ static const struct dev_pm_ops vbox_pm_ops = { ...@@ -172,13 +173,16 @@ static const struct dev_pm_ops vbox_pm_ops = {
.poweroff = vbox_pm_poweroff, .poweroff = vbox_pm_poweroff,
.restore = vbox_pm_resume, .restore = vbox_pm_resume,
}; };
#endif
static struct pci_driver vbox_pci_driver = { static struct pci_driver vbox_pci_driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
.id_table = pciidlist, .id_table = pciidlist,
.probe = vbox_pci_probe, .probe = vbox_pci_probe,
.remove = vbox_pci_remove, .remove = vbox_pci_remove,
#ifdef CONFIG_PM_SLEEP
.driver.pm = &vbox_pm_ops, .driver.pm = &vbox_pm_ops,
#endif
}; };
static const struct file_operations vbox_fops = { static const struct file_operations vbox_fops = {
...@@ -186,11 +190,9 @@ static const struct file_operations vbox_fops = { ...@@ -186,11 +190,9 @@ static const struct file_operations vbox_fops = {
.open = drm_open, .open = drm_open,
.release = drm_release, .release = drm_release,
.unlocked_ioctl = drm_ioctl, .unlocked_ioctl = drm_ioctl,
.compat_ioctl = drm_compat_ioctl,
.mmap = vbox_mmap, .mmap = vbox_mmap,
.poll = drm_poll, .poll = drm_poll,
#ifdef CONFIG_COMPAT
.compat_ioctl = drm_compat_ioctl,
#endif
.read = drm_read, .read = drm_read,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment