[Xquartz-changes] xserver: Branch 'master'

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


 hw/xfree86/fbdevhw/fbdevhw.c |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

New commits:
commit 037a7bcc8b6f0fcb6c655421f01394cf6f8ec5fa
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>
    (cherry picked from commit 0ab3a4a3eeeeed65a19f5db6839e5c981953c224)

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