[PATCH 16/16] viafb: Only suspend/resume on VX855

Jonathan Corbet <[email protected]> Thu, 8 Apr 2010 11:15:46 -0600
Newsgroups gmane.linux.kernel,gmane.linux.fbdev.devel
Message-ID <[email protected]>
The code is only known to work there, and is strongly suspected to not work
on other chipsets.

Signed-off-by: Jonathan Corbet <[email protected]>
---
 drivers/video/via/viafbdev.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index f834440..2e70c79 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -1916,6 +1916,12 @@ static int viafb_suspend(struct pci_dev *pdev, pm_message_t state)
 	int i;
 	void __iomem *iomem = viaparinfo->shared->engine_mmio;
 
+/*
+ * This code is currently only known to work on VX855
+ */
+	if (viaparinfo->shared->chip_info.gfx_chip_name != UNICHROME_VX855)
+		return -ENOTSUPP;
+
 	if (state.event == PM_EVENT_SUSPEND) {
 		acquire_console_sem();
 
@@ -1940,6 +1946,12 @@ static int viafb_resume(struct pci_dev *pdev)
 	int i;
 	void __iomem *iomem = viaparinfo->shared->engine_mmio;
 
+/*
+ * This code is currently only known to work on VX855
+ */
+	if (viaparinfo->shared->chip_info.gfx_chip_name != UNICHROME_VX855)
+		return -ENOTSUPP;
+
 	acquire_console_sem();
 	pci_set_power_state(pdev, PCI_D0);
 	pci_restore_state(pdev);
-- 
1.7.0.1