drm: bochs: fix warnings
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 12 Jul 2014 10:01:38 +0000 (11:01 +0100)
committerDave Airlie <airlied@redhat.com>
Tue, 22 Jul 2014 01:32:07 +0000 (11:32 +1000)
Regular nightly randconfig build testing discovered these warnings:

drivers/gpu/drm/bochs/bochs_drv.c:100:12: warning: 'bochs_pm_suspend' defined but not used [-Wunused-function]
drivers/gpu/drm/bochs/bochs_drv.c:117:12: warning: 'bochs_pm_resume' defined but not used [-Wunused-function]

Fix these by adding the same condition that SET_SYSTEM_SLEEP_PM_OPS()
uses.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/bochs/bochs_drv.c

index 9c13df29fd20ea2306f3d4b57369d9ce971566ec..f5e0ead974a638af3b997ecff8eb146740dc5bb9 100644 (file)
@@ -97,6 +97,7 @@ static struct drm_driver bochs_driver = {
 /* ---------------------------------------------------------------------- */
 /* pm interface                                                           */
 
+#ifdef CONFIG_PM_SLEEP
 static int bochs_pm_suspend(struct device *dev)
 {
        struct pci_dev *pdev = to_pci_dev(dev);
@@ -131,6 +132,7 @@ static int bochs_pm_resume(struct device *dev)
        drm_kms_helper_poll_enable(drm_dev);
        return 0;
 }
+#endif
 
 static const struct dev_pm_ops bochs_pm_ops = {
        SET_SYSTEM_SLEEP_PM_OPS(bochs_pm_suspend,