DORMANTno replies

[PATCH 10/20] vt8623fb: Fix compile warnings

From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2007-05-05 15:30:56
Subsystem: framebuffer layer, the rest · Maintainers: Helge Deller, Linus Torvalds

- use memset_io()
- check for return value of pci_enable_device()
- fix for CONFIG_PM=n

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
---

 drivers/video/vt8623fb.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/video/vt8623fb.c b/drivers/video/vt8623fb.c
index 4979af2..414e76b 100644
--- a/drivers/video/vt8623fb.c
+++ b/drivers/video/vt8623fb.c
@@ -497,7 +497,7 @@ static int vt8623fb_set_par(struct fb_in
 			 (info->var.vmode & FB_VMODE_DOUBLE) ? 2 : 1, 1,
 			 1, info->node);
 
-	memset((u8*)info->screen_base, 0x00, screen_size);
+	memset_io(info->screen_base, 0x00, screen_size);
 
 	/* Device and screen back on */
 	svga_wcrt_mask(0x17, 0x80, 0x80);
@@ -804,6 +804,7 @@ #endif
 }
 
 
+#ifdef CONFIG_PM
 /* PCI suspend */
 
 static int vt8623_pci_suspend(struct pci_dev* dev, pm_message_t state)
@@ -855,18 +856,25 @@ static int vt8623_pci_resume(struct pci_
 
 	pci_set_power_state(dev, PCI_D0);
 	pci_restore_state(dev);
-	pci_enable_device(dev);
+
+	if (pci_enable_device(dev))
+		goto fail;
+
 	pci_set_master(dev);
 
 	vt8623fb_set_par(info);
 	fb_set_suspend(info, 0);
 
 	mutex_unlock(&(par->open_lock));
+fail:
 	release_console_sem();
 
 	return 0;
 }
-
+#else
+#define vt8623_pci_suspend NULL
+#define vt8623_pci_resume NULL
+#endif /* CONFIG_PM */
 
 /* List of boards that we are trying to support */


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help