delete unused namep.

Signed-off-by: Tiago Vignatti <[email protected]>
---
 hw/xfree86/fbdevhw/fbdevhw.c |   20 ++++----------------
 1 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index a758f63..0966e2a 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -268,7 +268,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];
@@ -299,14 +299,9 @@ 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);
            }
        }
@@ -349,16 +344,9 @@ fbdev_open_pci(struct pci_device * pPci, char **namep)
            close(fd);
            continue;
        }
-       if (namep) {
-           *namep = xnfalloc(16);
-           strncpy(*namep,fix.id,16);
-       }
        return fd;
     }
 
-    if (namep)
-      *namep = NULL;
-
     xf86DrvMsg(-1, X_ERROR,
               "Unable to find a valid framebuffer device\n");
     return -1;
@@ -413,7 +401,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) {
-- 
1.7.1.226.g770c5

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to