[Xquartz-changes] xserver: Branch 'master'

Jeremy Huddleston jeremyhu at freedesktop.org
Wed Sep 14 18:18:04 PDT 2011


Rebased ref, commits from common ancestor:
commit dcc0f0f466bc6a9e65267fbabb000580b7d6314c
Author: Tiago Vignatti <tiago.vignatti at nokia.com>
Date:   Fri May 28 18:50:43 2010 +0300

    xfree86: fbdevhw: simplify fbdev_open_pci function
    
    delete unused namep.
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
    Tested-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index dee731b..e6b98e4 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -259,7 +259,7 @@ fbdev2xfree_timing(struct fb_var_screeninfo *var, DisplayModePtr mode)
  * Try to find the framebuffer device for a given PCI device 
  */
 static int
-fbdev_open_pci(struct pci_device * pPci, char **namep)
+fbdev_open_pci(struct pci_device * pPci)
 {
     struct	fb_fix_screeninfo fix;
     char	filename[256];
@@ -283,22 +283,14 @@ fbdev_open_pci(struct pci_device * pPci, char **namep)
 
 	    fd = open(filename, O_RDWR, 0);
 	    if (fd != -1) {
-		if (ioctl(fd, FBIOGET_FSCREENINFO, (void*) & fix) != -1) {
-		    if (namep) {
-			*namep = xnfalloc(16);
-			strncpy(*namep,fix.id,16);
-		    }
-
+		if (ioctl(fd, FBIOGET_FSCREENINFO, (void*) & fix) != -1)
 		    return fd;
-		}
+
 		close(fd);
 	    }
 	}
     }
 
-    if (namep)
-      *namep = NULL;
-
     xf86DrvMsg(-1, X_ERROR, "Unable to find a valid framebuffer device\n");
     return -1;
 }
@@ -370,7 +362,7 @@ fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device * pPci, char *device)
 
 	/* open device */
 	if (pPci)
-		fPtr->fd = fbdev_open_pci(pPci,NULL);
+		fPtr->fd = fbdev_open_pci(pPci);
 	else
 		fPtr->fd = fbdev_open(pScrn->scrnIndex,device,NULL);
 	if (-1 == fPtr->fd) {


More information about the Xquartz-changes mailing list