[PATCH xf86-video-sunffb] Remove xf86DPMSInit() duplication

Mark Kettenis mark.kettenis at xs4all.nl
Tue Dec 7 11:49:20 PST 2010


This driver calls xf86DPMSInit() twice, which is a bad idea since this
function wraps CloseScreen().  Remove the second call.  Fixes a crash on
server shutdown with xserver 1.9.2 on OpenBSD/sparc64.

Signed-off-by: Mark Kettenis <kettenis at openbsd.org>
---
 src/ffb_driver.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/src/ffb_driver.c b/src/ffb_driver.c
index 4e37c6c..3acc1a4 100644
--- a/src/ffb_driver.c
+++ b/src/ffb_driver.c
@@ -59,7 +59,6 @@ static void	FFBAdjustFrame(int scrnIndex, int x, int y, int flags);
 static void	FFBFreeScreen(int scrnIndex, int flags);
 static ModeStatus FFBValidMode(int scrnIndex, DisplayModePtr mode,
 			       Bool verbose, int flags);
-static void     FFBDPMSMode(ScrnInfoPtr pScrn, int DPMSMode, int flags);
 /* ffb_dga.c */
 extern void FFB_InitDGA(ScreenPtr pScreen);
 
@@ -805,8 +804,6 @@ FFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     pScreen->CloseScreen = FFBCloseScreen;
     pScreen->SaveScreen = FFBSaveScreen;
 
-    (void) xf86DPMSInit(pScreen, FFBDPMSMode, 0);
-
     /* Report any unused options (only for the first generation) */
     if (serverGeneration == 1) {
 	xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
@@ -978,13 +975,3 @@ FFBSync(ScrnInfoPtr pScrn)
 {
     return;
 }
-
-/*
-  Hook for DPMS Mode.
-*/
-
-static void
-FFBDPMSMode(ScrnInfoPtr pScrn, int DPMSMode, int flags)
-{
-  FFBDacDPMSMode(GET_FFB_FROM_SCRN(pScrn), DPMSMode, flags);
-}
-- 
1.7.3.2



More information about the xorg-devel mailing list