[PATCH v2] xfree86: configure: remove vendor and card name matching rules

Tiago Vignatti tiago.vignatti at nokia.com
Sat Jun 19 03:05:22 PDT 2010


Although vendor and board naming are used to create the configure file, the
server doesn't actually use it when fetching such file and probing devices.

Reported-by: Richard Barnette <jrbarnette at chromium.org>
Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
from v1: 
- remove two more superfluous assignments (kudos Keith).

Richard and James put the review stamp before, but I preferred to remove given
there was two bugs spotted by Keith. Anyway, your review again would be much
appreciated.

Thanks!

 hw/xfree86/common/xf86Configure.c |   25 -------------------------
 1 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 822d767..da654f0 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -107,8 +107,6 @@ bus_sbus_configure(void *busData)
 static void
 bus_pci_newdev_configure(void *busData, int i, int *chipset)
 {
-	const char *VendorName;
-	const char *CardName;
 	char busnum[8];
     struct pci_device * pVideo = NULL;
 
@@ -116,26 +114,6 @@ bus_pci_newdev_configure(void *busData, int i, int *chipset)
 
 	DevToConfig[i].pVideo = pVideo;
 
-	VendorName = pci_device_get_vendor_name( pVideo );
-	CardName = pci_device_get_device_name( pVideo );
-
-	if (!VendorName) {
-	    VendorName = xnfalloc(15);
-	    sprintf((char*)VendorName, "Unknown Vendor");
-	}
-
-	if (!CardName) {
-	    CardName = xnfalloc(14);
-	    sprintf((char*)CardName, "Unknown Board");
-	}
-
-	DevToConfig[i].GDev.identifier =
-	    xnfalloc(strlen(VendorName) + strlen(CardName) + 2);
-	sprintf(DevToConfig[i].GDev.identifier, "%s %s", VendorName, CardName);
-
-	DevToConfig[i].GDev.vendor = (char *)VendorName;
-	DevToConfig[i].GDev.board = (char *)CardName;
-
 	DevToConfig[i].GDev.busID = xnfalloc(16);
 	xf86FormatPciBusNumber(pVideo->bus, busnum);
 	sprintf(DevToConfig[i].GDev.busID, "PCI:%s:%d:%d",
@@ -357,9 +335,6 @@ configureDeviceSection (int screennum)
     /* Move device info to parser structure */
     sprintf(identifier, "Card%d", screennum);
     ptr->dev_identifier = strdup(identifier);
-/*    ptr->dev_identifier = DevToConfig[screennum].GDev.identifier;*/
-    ptr->dev_vendor = DevToConfig[screennum].GDev.vendor;
-    ptr->dev_board = DevToConfig[screennum].GDev.board;
     ptr->dev_chipset = DevToConfig[screennum].GDev.chipset;
     ptr->dev_busid = DevToConfig[screennum].GDev.busID;
     ptr->dev_driver = DevToConfig[screennum].GDev.driver;
-- 
1.7.1.226.g770c5



More information about the xorg-devel mailing list