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

drivers/gpu/drm/cirrus/cirrus_drv.c:79:12: warning: 'cirrus_pm_suspend' defined but not used [-Wunused-function]
drivers/gpu/drm/cirrus/cirrus_drv.c:96:12: warning: 'cirrus_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/cirrus/cirrus_drv.c

index 08ce520f61a5aa4f43823a3cc8fa30ce47315067..4516b052cc67f7e1b7f09452efdeb19a561880db 100644 (file)
@@ -76,6 +76,7 @@ static void cirrus_pci_remove(struct pci_dev *pdev)
        drm_put_dev(dev);
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int cirrus_pm_suspend(struct device *dev)
 {
        struct pci_dev *pdev = to_pci_dev(dev);
@@ -110,6 +111,7 @@ static int cirrus_pm_resume(struct device *dev)
        drm_kms_helper_poll_enable(drm_dev);
        return 0;
 }
+#endif
 
 static const struct file_operations cirrus_driver_fops = {
        .owner = THIS_MODULE,